idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
13,900 | init_seconds_var ()
{
SHELL_VAR *v;
v = find_variable ("SECONDS");
if (v)
{
if (legal_number (value_cell(v), &seconds_value_assigned) == 0)
seconds_value_assigned = 0;
}
INIT_DYNAMIC_VAR ("SECONDS", (v ? value_cell (v) : (char *)NULL), get_seconds, assign_seconds);
return v;
}
| Exec Code Overflow | 0 | init_seconds_var ()
{
SHELL_VAR *v;
v = find_variable ("SECONDS");
if (v)
{
if (legal_number (value_cell(v), &seconds_value_assigned) == 0)
seconds_value_assigned = 0;
}
INIT_DYNAMIC_VAR ("SECONDS", (v ? value_cell (v) : (char *)NULL), get_seconds, assign_seconds);
return v;
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,901 | initialize_dynamic_variables ()
{
SHELL_VAR *v;
v = init_seconds_var ();
INIT_DYNAMIC_VAR ("BASH_COMMAND", (char *)NULL, get_bash_command, (sh_var_assign_func_t *)NULL);
INIT_DYNAMIC_VAR ("BASH_SUBSHELL", (char *)NULL, get_subshell, assign_subshell);
INIT_DYNAMIC_VAR ("RANDOM", (char *)NULL, get_random, as... | Exec Code Overflow | 0 | initialize_dynamic_variables ()
{
SHELL_VAR *v;
v = init_seconds_var ();
INIT_DYNAMIC_VAR ("BASH_COMMAND", (char *)NULL, get_bash_command, (sh_var_assign_func_t *)NULL);
INIT_DYNAMIC_VAR ("BASH_SUBSHELL", (char *)NULL, get_subshell, assign_subshell);
INIT_DYNAMIC_VAR ("RANDOM", (char *)NULL, get_random, as... | @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,902 | initialize_shell_level ()
{
adjust_shell_level (1);
}
| Exec Code Overflow | 0 | initialize_shell_level ()
{
adjust_shell_level (1);
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,903 | local_exported_variables ()
{
return (vapply (local_and_exported));
}
| Exec Code Overflow | 0 | local_exported_variables ()
{
return (vapply (local_and_exported));
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,904 | make_vers_array ()
{
SHELL_VAR *vv;
ARRAY *av;
char *s, d[32], b[INT_STRLEN_BOUND(int) + 1];
unbind_variable ("BASH_VERSINFO");
vv = make_new_array_variable ("BASH_VERSINFO");
av = array_cell (vv);
strcpy (d, dist_version);
s = strchr (d, '.');
if (s)
*s++ = '\0';
array_insert (av, 0, d);
ar... | Exec Code Overflow | 0 | make_vers_array ()
{
SHELL_VAR *vv;
ARRAY *av;
char *s, d[32], b[INT_STRLEN_BOUND(int) + 1];
unbind_variable ("BASH_VERSINFO");
vv = make_new_array_variable ("BASH_VERSINFO");
av = array_cell (vv);
strcpy (d, dist_version);
s = strchr (d, '.');
if (s)
*s++ = '\0';
array_insert (av, 0, d);
ar... | @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,905 | maybe_make_export_env ()
{
register char **temp_array;
int new_size;
VAR_CONTEXT *tcxt;
if (array_needs_making)
{
if (export_env)
strvec_flush (export_env);
/* Make a guess based on how many shell variables and functions we
have. Since there will always be array variables, and array
vari... | Exec Code Overflow | 0 | maybe_make_export_env ()
{
register char **temp_array;
int new_size;
VAR_CONTEXT *tcxt;
if (array_needs_making)
{
if (export_env)
strvec_flush (export_env);
/* Make a guess based on how many shell variables and functions we
have. Since there will always be array variables, and array
vari... | @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,906 | merge_temporary_env ()
{
if (temporary_env)
dispose_temporary_env (push_temp_var);
}
| Exec Code Overflow | 0 | merge_temporary_env ()
{
if (temporary_env)
dispose_temporary_env (push_temp_var);
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,907 | n_shell_variables ()
{
VAR_CONTEXT *vc;
int n;
for (n = 0, vc = shell_variables; vc; vc = vc->down)
n += HASH_ENTRIES (vc->table);
return n;
}
| Exec Code Overflow | 0 | n_shell_variables ()
{
VAR_CONTEXT *vc;
int n;
for (n = 0, vc = shell_variables; vc; vc = vc->down)
n += HASH_ENTRIES (vc->table);
return n;
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,908 | pop_context ()
{
pop_dollar_vars ();
variable_context--;
pop_var_context ();
sv_ifs ("IFS"); /* XXX here for now */
}
| Exec Code Overflow | 0 | pop_context ()
{
pop_dollar_vars ();
variable_context--;
pop_var_context ();
sv_ifs ("IFS"); /* XXX here for now */
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,909 | pop_var_context ()
{
VAR_CONTEXT *ret, *vcxt;
vcxt = shell_variables;
if (vc_isfuncenv (vcxt) == 0)
{
internal_error (_("pop_var_context: head of shell_variables not a function context"));
return;
}
if (ret = vcxt->down)
{
ret->up = (VAR_CONTEXT *)NULL;
shell_variables = re... | Exec Code Overflow | 0 | pop_var_context ()
{
VAR_CONTEXT *ret, *vcxt;
vcxt = shell_variables;
if (vc_isfuncenv (vcxt) == 0)
{
internal_error (_("pop_var_context: head of shell_variables not a function context"));
return;
}
if (ret = vcxt->down)
{
ret->up = (VAR_CONTEXT *)NULL;
shell_variables = re... | @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,910 | push_dollar_vars ()
{
if (dollar_arg_stack_index + 2 > dollar_arg_stack_slots)
{
dollar_arg_stack = (WORD_LIST **)
xrealloc (dollar_arg_stack, (dollar_arg_stack_slots += 10)
* sizeof (WORD_LIST *));
}
dollar_arg_stack[dollar_arg_stack_index++] = list_rest_of_args ();
dollar_arg_stack[dollar_arg... | Exec Code Overflow | 0 | push_dollar_vars ()
{
if (dollar_arg_stack_index + 2 > dollar_arg_stack_slots)
{
dollar_arg_stack = (WORD_LIST **)
xrealloc (dollar_arg_stack, (dollar_arg_stack_slots += 10)
* sizeof (WORD_LIST *));
}
dollar_arg_stack[dollar_arg_stack_index++] = list_rest_of_args ();
dollar_arg_stack[dollar_arg... | @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,911 | seedrand ()
{
struct timeval tv;
gettimeofday (&tv, NULL);
sbrand (tv.tv_sec ^ tv.tv_usec ^ getpid ());
}
| Exec Code Overflow | 0 | seedrand ()
{
struct timeval tv;
gettimeofday (&tv, NULL);
sbrand (tv.tv_sec ^ tv.tv_usec ^ getpid ());
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,912 | set_home_var ()
{
SHELL_VAR *temp_var;
temp_var = find_variable ("HOME");
if (temp_var == 0)
temp_var = bind_variable ("HOME", sh_get_home_dir (), 0);
#if 0
VSETATTR (temp_var, att_exported);
#endif
}
| Exec Code Overflow | 0 | set_home_var ()
{
SHELL_VAR *temp_var;
temp_var = find_variable ("HOME");
if (temp_var == 0)
temp_var = bind_variable ("HOME", sh_get_home_dir (), 0);
#if 0
VSETATTR (temp_var, att_exported);
#endif
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,913 | set_ppid ()
{
char namebuf[INT_STRLEN_BOUND(pid_t) + 1], *name;
SHELL_VAR *temp_var;
name = inttostr (getppid (), namebuf, sizeof(namebuf));
temp_var = find_variable ("PPID");
if (temp_var)
VUNSETATTR (temp_var, (att_readonly | att_exported));
temp_var = bind_variable ("PPID", name, 0);
VSETATTR (tem... | Exec Code Overflow | 0 | set_ppid ()
{
char namebuf[INT_STRLEN_BOUND(pid_t) + 1], *name;
SHELL_VAR *temp_var;
name = inttostr (getppid (), namebuf, sizeof(namebuf));
temp_var = find_variable ("PPID");
if (temp_var)
VUNSETATTR (temp_var, (att_readonly | att_exported));
temp_var = bind_variable ("PPID", name, 0);
VSETATTR (tem... | @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,914 | set_pwd ()
{
SHELL_VAR *temp_var, *home_var;
char *temp_string, *home_string;
home_var = find_variable ("HOME");
home_string = home_var ? value_cell (home_var) : (char *)NULL;
temp_var = find_variable ("PWD");
if (temp_var && imported_p (temp_var) &&
(temp_string = value_cell (temp_var)) &&
sa... | Exec Code Overflow | 0 | set_pwd ()
{
SHELL_VAR *temp_var, *home_var;
char *temp_string, *home_string;
home_var = find_variable ("HOME");
home_string = home_var ? value_cell (home_var) : (char *)NULL;
temp_var = find_variable ("PWD");
if (temp_var && imported_p (temp_var) &&
(temp_string = value_cell (temp_var)) &&
sa... | @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,915 | set_shell_var ()
{
SHELL_VAR *temp_var;
temp_var = find_variable ("SHELL");
if (temp_var == 0)
{
if (current_user.shell == 0)
get_current_user_info ();
temp_var = bind_variable ("SHELL", current_user.shell, 0);
}
#if 0
VSETATTR (temp_var, att_exported);
#endif
}
| Exec Code Overflow | 0 | set_shell_var ()
{
SHELL_VAR *temp_var;
temp_var = find_variable ("SHELL");
if (temp_var == 0)
{
if (current_user.shell == 0)
get_current_user_info ();
temp_var = bind_variable ("SHELL", current_user.shell, 0);
}
#if 0
VSETATTR (temp_var, att_exported);
#endif
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,916 | sh_get_home_dir ()
{
if (current_user.home_dir == 0)
get_current_user_info ();
return current_user.home_dir;
}
| Exec Code Overflow | 0 | sh_get_home_dir ()
{
if (current_user.home_dir == 0)
get_current_user_info ();
return current_user.home_dir;
}
| @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,917 | uidset ()
{
char buff[INT_STRLEN_BOUND(uid_t) + 1], *b;
register SHELL_VAR *v;
b = inttostr (current_user.uid, buff, sizeof (buff));
v = find_variable ("UID");
if (v == 0)
{
v = bind_variable ("UID", b, 0);
VSETATTR (v, (att_readonly | att_integer));
}
if (current_user.euid != current_... | Exec Code Overflow | 0 | uidset ()
{
char buff[INT_STRLEN_BOUND(uid_t) + 1], *b;
register SHELL_VAR *v;
b = inttostr (current_user.uid, buff, sizeof (buff));
v = find_variable ("UID");
if (v == 0)
{
v = bind_variable ("UID", b, 0);
VSETATTR (v, (att_readonly | att_integer));
}
if (current_user.euid != current_... | @@ -4666,12 +4666,18 @@ sv_locale (name)
char *name;
{
char *v;
+ int r;
v = get_string_value (name);
if (name[0] == 'L' && name[1] == 'A') /* LANG */
- set_lang (name, v);
+ r = set_lang (name, v);
else
- set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+ r = set_locale_var (name, v... | CWE-119 | null | null |
13,918 | PanoramiXExtensionInit(void)
{
int i;
Bool success = FALSE;
ExtensionEntry *extEntry;
ScreenPtr pScreen = screenInfo.screens[0];
PanoramiXScreenPtr pScreenPriv;
if (noPanoramiXExtension)
return;
if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) {
noPano... | Exec Code | 0 | PanoramiXExtensionInit(void)
{
int i;
Bool success = FALSE;
ExtensionEntry *extEntry;
ScreenPtr pScreen = screenInfo.screens[0];
PanoramiXScreenPtr pScreenPriv;
if (noPanoramiXExtension)
return;
if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) {
noPano... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,919 | PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen)
{
PanoramiXSearchData data;
void *val;
if (!screen) {
dixLookupResourceByType(&val, id, type, serverClient, DixReadAccess);
return val;
}
data.screen = screen;
data.id = id;
return LookupClientResourceComplex(client... | Exec Code | 0 | PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen)
{
PanoramiXSearchData data;
void *val;
if (!screen) {
dixLookupResourceByType(&val, id, type, serverClient, DixReadAccess);
return val;
}
data.screen = screen;
data.id = id;
return LookupClientResourceComplex(client... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,920 | PanoramiXMaybeAddDepth(DepthPtr pDepth)
{
ScreenPtr pScreen;
int j, k;
Bool found = FALSE;
FOR_NSCREENS_FORWARD_SKIP(j) {
pScreen = screenInfo.screens[j];
for (k = 0; k < pScreen->numDepths; k++) {
if (pScreen->allowedDepths[k].depth == pDepth->depth) {
found... | Exec Code | 0 | PanoramiXMaybeAddDepth(DepthPtr pDepth)
{
ScreenPtr pScreen;
int j, k;
Bool found = FALSE;
FOR_NSCREENS_FORWARD_SKIP(j) {
pScreen = screenInfo.screens[j];
for (k = 0; k < pScreen->numDepths; k++) {
if (pScreen->allowedDepths[k].depth == pDepth->depth) {
found... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,921 | PanoramiXMaybeAddVisual(VisualPtr pVisual)
{
ScreenPtr pScreen;
int j, k;
Bool found = FALSE;
FOR_NSCREENS_FORWARD_SKIP(j) {
pScreen = screenInfo.screens[j];
found = FALSE;
for (k = 0; k < pScreen->numVisuals; k++) {
VisualPtr candidate = &pScreen->visuals[k];
... | Exec Code | 0 | PanoramiXMaybeAddVisual(VisualPtr pVisual)
{
ScreenPtr pScreen;
int j, k;
Bool found = FALSE;
FOR_NSCREENS_FORWARD_SKIP(j) {
pScreen = screenInfo.screens[j];
found = FALSE;
for (k = 0; k < pScreen->numVisuals; k++) {
VisualPtr candidate = &pScreen->visuals[k];
... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,922 | ProcPanoramiXDispatch(ClientPtr client)
{
REQUEST(xReq);
switch (stuff->data) {
case X_PanoramiXQueryVersion:
return ProcPanoramiXQueryVersion(client);
case X_PanoramiXGetState:
return ProcPanoramiXGetState(client);
case X_PanoramiXGetScreenCount:
return ProcPanoramiXGetScree... | Exec Code | 0 | ProcPanoramiXDispatch(ClientPtr client)
{
REQUEST(xReq);
switch (stuff->data) {
case X_PanoramiXQueryVersion:
return ProcPanoramiXQueryVersion(client);
case X_PanoramiXGetState:
return ProcPanoramiXGetState(client);
case X_PanoramiXGetScreenCount:
return ProcPanoramiXGetScree... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,923 | ProcPanoramiXGetState(ClientPtr client)
{
REQUEST(xPanoramiXGetStateReq);
WindowPtr pWin;
xPanoramiXGetStateReply rep;
int rc;
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
return rc;
rep = (x... | Exec Code | 0 | ProcPanoramiXGetState(ClientPtr client)
{
REQUEST(xPanoramiXGetStateReq);
WindowPtr pWin;
xPanoramiXGetStateReply rep;
int rc;
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
return rc;
rep = (x... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,924 | ProcXineramaIsActive(ClientPtr client)
{
/* REQUEST(xXineramaIsActiveReq); */
xXineramaIsActiveReply rep;
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
rep = (xXineramaIsActiveReply) {
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = 0,
#if 1
/* The following ... | Exec Code | 0 | ProcXineramaIsActive(ClientPtr client)
{
/* REQUEST(xXineramaIsActiveReq); */
xXineramaIsActiveReply rep;
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
rep = (xXineramaIsActiveReply) {
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = 0,
#if 1
/* The following ... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,925 | ProcXineramaQueryScreens(ClientPtr client)
{
/* REQUEST(xXineramaQueryScreensReq); */
CARD32 number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
xXineramaQueryScreensReply rep = {
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = bytes_to_int32(number * sz_Xineram... | Exec Code | 0 | ProcXineramaQueryScreens(ClientPtr client)
{
/* REQUEST(xXineramaQueryScreensReq); */
CARD32 number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
xXineramaQueryScreensReply rep = {
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = bytes_to_int32(number * sz_Xineram... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,926 | XineramaChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
Xinerama_GC_FUNC_EPILOGUE(pGC);
}
| Exec Code | 0 | XineramaChangeClip(GCPtr pGC, int type, void *pvalue, int nrects)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects);
Xinerama_GC_FUNC_EPILOGUE(pGC);
}
| @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,927 | XineramaChangeGC(GCPtr pGC, unsigned long mask)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
if (mask & GCTileStipXOrigin)
pGCPriv->patOrg.x = pGC->patOrg.x;
if (mask & GCTileStipYOrigin)
pGCPriv->patOrg.y = pGC->patOrg.y;
if (mask & GCClipXOrigin)
pGCPriv->clipOrg.x = pGC->clipOrg.x;
... | Exec Code | 0 | XineramaChangeGC(GCPtr pGC, unsigned long mask)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
if (mask & GCTileStipXOrigin)
pGCPriv->patOrg.x = pGC->patOrg.x;
if (mask & GCTileStipYOrigin)
pGCPriv->patOrg.y = pGC->patOrg.y;
if (mask & GCClipXOrigin)
pGCPriv->clipOrg.x = pGC->clipOrg.x;
... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,928 | XineramaCloseScreen(ScreenPtr pScreen)
{
PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr)
dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey);
pScreen->CloseScreen = pScreenPriv->CloseScreen;
pScreen->CreateGC = pScreenPriv->CreateGC;
if (pScreen->myNum == 0)
RegionUninit(... | Exec Code | 0 | XineramaCloseScreen(ScreenPtr pScreen)
{
PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr)
dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey);
pScreen->CloseScreen = pScreenPriv->CloseScreen;
pScreen->CreateGC = pScreenPriv->CreateGC;
if (pScreen->myNum == 0)
RegionUninit(... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,929 | XineramaCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
{
Xinerama_GC_FUNC_PROLOGUE(pgcDst);
(*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc);
Xinerama_GC_FUNC_EPILOGUE(pgcDst);
}
| Exec Code | 0 | XineramaCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
{
Xinerama_GC_FUNC_PROLOGUE(pgcDst);
(*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc);
Xinerama_GC_FUNC_EPILOGUE(pgcDst);
}
| @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,930 | XineramaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst)
{
PanoramiXGCPtr pSrcPriv = (PanoramiXGCPtr)
dixLookupPrivate(&pGCSrc->devPrivates, PanoramiXGCKey);
Xinerama_GC_FUNC_PROLOGUE(pGCDst);
if (mask & GCTileStipXOrigin)
pGCPriv->patOrg.x = pSrcPriv->patOrg.x;
if (mask & GCTile... | Exec Code | 0 | XineramaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst)
{
PanoramiXGCPtr pSrcPriv = (PanoramiXGCPtr)
dixLookupPrivate(&pGCSrc->devPrivates, PanoramiXGCKey);
Xinerama_GC_FUNC_PROLOGUE(pGCDst);
if (mask & GCTileStipXOrigin)
pGCPriv->patOrg.x = pSrcPriv->patOrg.x;
if (mask & GCTile... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,931 | XineramaCreateGC(GCPtr pGC)
{
ScreenPtr pScreen = pGC->pScreen;
PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr)
dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey);
Bool ret;
pScreen->CreateGC = pScreenPriv->CreateGC;
if ((ret = (*pScreen->CreateGC) (pGC))) {
PanoramiX... | Exec Code | 0 | XineramaCreateGC(GCPtr pGC)
{
ScreenPtr pScreen = pGC->pScreen;
PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr)
dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey);
Bool ret;
pScreen->CreateGC = pScreenPriv->CreateGC;
if ((ret = (*pScreen->CreateGC) (pGC))) {
PanoramiX... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,932 | XineramaDestroyClip(GCPtr pGC)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->DestroyClip) (pGC);
Xinerama_GC_FUNC_EPILOGUE(pGC);
}
| Exec Code | 0 | XineramaDestroyClip(GCPtr pGC)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->DestroyClip) (pGC);
Xinerama_GC_FUNC_EPILOGUE(pGC);
}
| @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,933 | XineramaDestroyGC(GCPtr pGC)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->DestroyGC) (pGC);
Xinerama_GC_FUNC_EPILOGUE(pGC);
}
| Exec Code | 0 | XineramaDestroyGC(GCPtr pGC)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->DestroyGC) (pGC);
Xinerama_GC_FUNC_EPILOGUE(pGC);
}
| @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,934 | XineramaFindIDByScrnum(void *resource, XID id, void *privdata)
{
PanoramiXRes *res = (PanoramiXRes *) resource;
PanoramiXSearchData *data = (PanoramiXSearchData *) privdata;
return res->info[data->screen].id == data->id;
}
| Exec Code | 0 | XineramaFindIDByScrnum(void *resource, XID id, void *privdata)
{
PanoramiXRes *res = (PanoramiXRes *) resource;
PanoramiXSearchData *data = (PanoramiXSearchData *) privdata;
return res->info[data->screen].id == data->id;
}
| @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,935 | XineramaGetImageData(DrawablePtr *pDrawables,
int left,
int top,
int width,
int height,
unsigned int format,
unsigned long planemask,
char *data, int pitch, Bool isRoot)
{
... | Exec Code | 0 | XineramaGetImageData(DrawablePtr *pDrawables,
int left,
int top,
int width,
int height,
unsigned int format,
unsigned long planemask,
char *data, int pitch, Bool isRoot)
{
... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,936 | XineramaRegisterConnectionBlockCallback(void (*func) (void))
{
XineramaConnectionCallbackList *newlist;
if (!(newlist = malloc(sizeof(XineramaConnectionCallbackList))))
return FALSE;
newlist->next = ConnectionCallbackList;
newlist->func = func;
ConnectionCallbackList = newlist;
return... | Exec Code | 0 | XineramaRegisterConnectionBlockCallback(void (*func) (void))
{
XineramaConnectionCallbackList *newlist;
if (!(newlist = malloc(sizeof(XineramaConnectionCallbackList))))
return FALSE;
newlist->next = ConnectionCallbackList;
newlist->func = func;
ConnectionCallbackList = newlist;
return... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,937 | XineramaReinitData(void)
{
RegionUninit(&PanoramiXScreenRegion);
XineramaInitData();
}
| Exec Code | 0 | XineramaReinitData(void)
{
RegionUninit(&PanoramiXScreenRegion);
XineramaInitData();
}
| @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,938 | XineramaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
if ((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr) pDraw)->parent)) {
/* the root window */
int x_off = pGC->pScreen->x;
int y_off = pGC->pScreen->y;
int new_val;
... | Exec Code | 0 | XineramaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw)
{
Xinerama_GC_FUNC_PROLOGUE(pGC);
if ((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr) pDraw)->parent)) {
/* the root window */
int x_off = pGC->pScreen->x;
int y_off = pGC->pScreen->y;
int new_val;
... | @@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
xPanoramiXGetScreenSizeReply rep;
int rc;
+ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
rc = dixLoo... | CWE-20 | null | null |
13,939 | CheckScreenPrivate(ScreenPtr pScreen)
{
SetupScreen(pScreen);
if (!pPriv)
return;
if (!pPriv->attr && !pPriv->events &&
!pPriv->hasWindow && pPriv->installedMap == None) {
free(pPriv);
SetScreenPrivate(pScreen, NULL);
pScreen->screensaver.ExternalScreenSaver = NULL;
... | Exec Code | 0 | CheckScreenPrivate(ScreenPtr pScreen)
{
SetupScreen(pScreen);
if (!pPriv)
return;
if (!pPriv->attr && !pPriv->events &&
!pPriv->hasWindow && pPriv->installedMap == None) {
free(pPriv);
SetScreenPrivate(pScreen, NULL);
pScreen->screensaver.ExternalScreenSaver = NULL;
... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,940 | CreateSaverWindow(ScreenPtr pScreen)
{
SetupScreen(pScreen);
ScreenSaverStuffPtr pSaver;
ScreenSaverAttrPtr pAttr;
WindowPtr pWin;
int result;
unsigned long mask;
Colormap wantMap;
ColormapPtr pCmap;
pSaver = &pScreen->screensaver;
if (pSaver->pWindow) {
pSaver->pWindow ... | Exec Code | 0 | CreateSaverWindow(ScreenPtr pScreen)
{
SetupScreen(pScreen);
ScreenSaverStuffPtr pSaver;
ScreenSaverAttrPtr pAttr;
WindowPtr pWin;
int result;
unsigned long mask;
Colormap wantMap;
ColormapPtr pCmap;
pSaver = &pScreen->screensaver;
if (pSaver->pWindow) {
pSaver->pWindow ... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,941 | DestroySaverWindow(ScreenPtr pScreen)
{
SetupScreen(pScreen);
ScreenSaverStuffPtr pSaver;
if (!pPriv || !pPriv->hasWindow)
return FALSE;
pSaver = &pScreen->screensaver;
if (pSaver->pWindow) {
pSaver->pWindow = NullWindow;
FreeResource(pSaver->wid, RT_NONE);
}
pPriv-... | Exec Code | 0 | DestroySaverWindow(ScreenPtr pScreen)
{
SetupScreen(pScreen);
ScreenSaverStuffPtr pSaver;
if (!pPriv || !pPriv->hasWindow)
return FALSE;
pSaver = &pScreen->screensaver;
if (pSaver->pWindow) {
pSaver->pWindow = NullWindow;
FreeResource(pSaver->wid, RT_NONE);
}
pPriv-... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,942 | FreeAttrs(ScreenSaverAttrPtr pAttr)
{
PixmapPtr pPixmap;
CursorPtr pCursor;
if ((pPixmap = pAttr->pBackgroundPixmap) != 0)
(*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
if ((pPixmap = pAttr->pBorderPixmap) != 0)
(*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
if ((pC... | Exec Code | 0 | FreeAttrs(ScreenSaverAttrPtr pAttr)
{
PixmapPtr pPixmap;
CursorPtr pCursor;
if ((pPixmap = pAttr->pBackgroundPixmap) != 0)
(*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
if ((pPixmap = pAttr->pBorderPixmap) != 0)
(*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap);
if ((pC... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,943 | MakeScreenPrivate(ScreenPtr pScreen)
{
SetupScreen(pScreen);
if (pPriv)
return pPriv;
pPriv = New(ScreenSaverScreenPrivateRec);
if (!pPriv)
return 0;
pPriv->events = 0;
pPriv->attr = 0;
pPriv->hasWindow = FALSE;
pPriv->installedMap = None;
SetScreenPrivate(pScreen, p... | Exec Code | 0 | MakeScreenPrivate(ScreenPtr pScreen)
{
SetupScreen(pScreen);
if (pPriv)
return pPriv;
pPriv = New(ScreenSaverScreenPrivateRec);
if (!pPriv)
return 0;
pPriv->events = 0;
pPriv->attr = 0;
pPriv->hasWindow = FALSE;
pPriv->installedMap = None;
SetScreenPrivate(pScreen, p... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,944 | ProcScreenSaverDispatch(ClientPtr client)
{
REQUEST(xReq);
if (stuff->data < NUM_REQUESTS)
return (*NormalVector[stuff->data]) (client);
return BadRequest;
}
| Exec Code | 0 | ProcScreenSaverDispatch(ClientPtr client)
{
REQUEST(xReq);
if (stuff->data < NUM_REQUESTS)
return (*NormalVector[stuff->data]) (client);
return BadRequest;
}
| @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,945 | ProcScreenSaverQueryInfo(ClientPtr client)
{
REQUEST(xScreenSaverQueryInfoReq);
xScreenSaverQueryInfoReply rep;
int rc;
ScreenSaverStuffPtr pSaver;
DrawablePtr pDraw;
CARD32 lastInput;
ScreenSaverScreenPrivatePtr pPriv;
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
rc = dixLookupDra... | Exec Code | 0 | ProcScreenSaverQueryInfo(ClientPtr client)
{
REQUEST(xScreenSaverQueryInfoReq);
xScreenSaverQueryInfoReply rep;
int rc;
ScreenSaverStuffPtr pSaver;
DrawablePtr pDraw;
CARD32 lastInput;
ScreenSaverScreenPrivatePtr pPriv;
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
rc = dixLookupDra... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,946 | ProcScreenSaverSelectInput(ClientPtr client)
{
REQUEST(xScreenSaverSelectInputReq);
DrawablePtr pDraw;
int rc;
REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
DixGetAttrAccess);
if (rc != Success)
retu... | Exec Code | 0 | ProcScreenSaverSelectInput(ClientPtr client)
{
REQUEST(xScreenSaverSelectInputReq);
DrawablePtr pDraw;
int rc;
REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
DixGetAttrAccess);
if (rc != Success)
retu... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,947 | ProcScreenSaverSetAttributes(ClientPtr client)
{
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
REQUEST(xScreenSaverSetAttributesReq);
PanoramiXRes *draw;
PanoramiXRes *backPix = NULL;
PanoramiXRes *bordPix = NULL;
PanoramiXRes *cmap = NULL;
int i, status, len;
... | Exec Code | 0 | ProcScreenSaverSetAttributes(ClientPtr client)
{
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
REQUEST(xScreenSaverSetAttributesReq);
PanoramiXRes *draw;
PanoramiXRes *backPix = NULL;
PanoramiXRes *bordPix = NULL;
PanoramiXRes *cmap = NULL;
int i, status, len;
... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,948 | ProcScreenSaverSuspend(ClientPtr client)
{
ScreenSaverSuspensionPtr *prev, this;
REQUEST(xScreenSaverSuspendReq);
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
/* Check if this client is suspending the screensaver */
for (prev = &suspendingClients; (this = *prev); prev = &this->next)
if (thi... | Exec Code | 0 | ProcScreenSaverSuspend(ClientPtr client)
{
ScreenSaverSuspensionPtr *prev, this;
REQUEST(xScreenSaverSuspendReq);
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
/* Check if this client is suspending the screensaver */
for (prev = &suspendingClients; (this = *prev); prev = &this->next)
if (thi... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,949 | SProcScreenSaverDispatch(ClientPtr client)
{
REQUEST(xReq);
if (stuff->data < NUM_REQUESTS)
return (*SwappedVector[stuff->data]) (client);
return BadRequest;
}
| Exec Code | 0 | SProcScreenSaverDispatch(ClientPtr client)
{
REQUEST(xReq);
if (stuff->data < NUM_REQUESTS)
return (*SwappedVector[stuff->data]) (client);
return BadRequest;
}
| @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,950 | SProcScreenSaverQueryInfo(ClientPtr client)
{
REQUEST(xScreenSaverQueryInfoReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
swapl(&stuff->drawable);
return ProcScreenSaverQueryInfo(client);
}
| Exec Code | 0 | SProcScreenSaverQueryInfo(ClientPtr client)
{
REQUEST(xScreenSaverQueryInfoReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
swapl(&stuff->drawable);
return ProcScreenSaverQueryInfo(client);
}
| @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,951 | SProcScreenSaverQueryVersion(ClientPtr client)
{
REQUEST(xScreenSaverQueryVersionReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
return ProcScreenSaverQueryVersion(client);
}
| Exec Code | 0 | SProcScreenSaverQueryVersion(ClientPtr client)
{
REQUEST(xScreenSaverQueryVersionReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
return ProcScreenSaverQueryVersion(client);
}
| @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,952 | SProcScreenSaverSuspend(ClientPtr client)
{
REQUEST(xScreenSaverSuspendReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
return ProcScreenSaverSuspend(client);
}
| Exec Code | 0 | SProcScreenSaverSuspend(ClientPtr client)
{
REQUEST(xScreenSaverSuspendReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
return ProcScreenSaverSuspend(client);
}
| @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,953 | SScreenSaverNotifyEvent(xScreenSaverNotifyEvent * from,
xScreenSaverNotifyEvent * to)
{
to->type = from->type;
to->state = from->state;
cpswaps(from->sequenceNumber, to->sequenceNumber);
cpswapl(from->timestamp, to->timestamp);
cpswapl(from->root, to->root);
cpswapl(from-... | Exec Code | 0 | SScreenSaverNotifyEvent(xScreenSaverNotifyEvent * from,
xScreenSaverNotifyEvent * to)
{
to->type = from->type;
to->state = from->state;
cpswaps(from->sequenceNumber, to->sequenceNumber);
cpswapl(from->timestamp, to->timestamp);
cpswapl(from->root, to->root);
cpswapl(from-... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,954 | ScreenSaverFreeAttr(void *value, XID id)
{
ScreenSaverAttrPtr pOldAttr = (ScreenSaverAttrPtr) value;
ScreenPtr pScreen = pOldAttr->screen;
SetupScreen(pScreen);
if (!pPriv)
return TRUE;
if (pPriv->attr != pOldAttr)
return TRUE;
FreeScreenAttr(pOldAttr);
pPriv->attr = NULL;
... | Exec Code | 0 | ScreenSaverFreeAttr(void *value, XID id)
{
ScreenSaverAttrPtr pOldAttr = (ScreenSaverAttrPtr) value;
ScreenPtr pScreen = pOldAttr->screen;
SetupScreen(pScreen);
if (!pPriv)
return TRUE;
if (pPriv->attr != pOldAttr)
return TRUE;
FreeScreenAttr(pOldAttr);
pPriv->attr = NULL;
... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,955 | ScreenSaverFreeEvents(void *value, XID id)
{
ScreenSaverEventPtr pOld = (ScreenSaverEventPtr) value;
ScreenPtr pScreen = pOld->screen;
SetupScreen(pScreen);
ScreenSaverEventPtr pEv, *pPrev;
if (!pPriv)
return TRUE;
for (pPrev = &pPriv->events; (pEv = *pPrev) != 0; pPrev = &pEv->next)
... | Exec Code | 0 | ScreenSaverFreeEvents(void *value, XID id)
{
ScreenSaverEventPtr pOld = (ScreenSaverEventPtr) value;
ScreenPtr pScreen = pOld->screen;
SetupScreen(pScreen);
ScreenSaverEventPtr pEv, *pPrev;
if (!pPriv)
return TRUE;
for (pPrev = &pPriv->events; (pEv = *pPrev) != 0; pPrev = &pEv->next)
... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,956 | ScreenSaverFreeSuspend(void *value, XID id)
{
ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value;
ScreenSaverSuspensionPtr *prev, this;
/* Unlink and free the suspension record for the client */
for (prev = &suspendingClients; (this = *prev); prev = &this->next) {
if (this == data... | Exec Code | 0 | ScreenSaverFreeSuspend(void *value, XID id)
{
ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value;
ScreenSaverSuspensionPtr *prev, this;
/* Unlink and free the suspension record for the client */
for (prev = &suspendingClients; (this = *prev); prev = &this->next) {
if (this == data... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,957 | ScreenSaverHandle(ScreenPtr pScreen, int xstate, Bool force)
{
int state = 0;
Bool ret = FALSE;
ScreenSaverScreenPrivatePtr pPriv;
switch (xstate) {
case SCREEN_SAVER_ON:
state = ScreenSaverOn;
ret = CreateSaverWindow(pScreen);
break;
case SCREEN_SAVER_OFF:
state... | Exec Code | 0 | ScreenSaverHandle(ScreenPtr pScreen, int xstate, Bool force)
{
int state = 0;
Bool ret = FALSE;
ScreenSaverScreenPrivatePtr pPriv;
switch (xstate) {
case SCREEN_SAVER_ON:
state = ScreenSaverOn;
ret = CreateSaverWindow(pScreen);
break;
case SCREEN_SAVER_OFF:
state... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,958 | ScreenSaverSetAttributes(ClientPtr client)
{
REQUEST(xScreenSaverSetAttributesReq);
DrawablePtr pDraw;
WindowPtr pParent;
ScreenPtr pScreen;
ScreenSaverScreenPrivatePtr pPriv = 0;
ScreenSaverAttrPtr pAttr = 0;
int ret, len, class, bw, depth;
unsigned long visual;
int idepth, ivisual;... | Exec Code | 0 | ScreenSaverSetAttributes(ClientPtr client)
{
REQUEST(xScreenSaverSetAttributesReq);
DrawablePtr pDraw;
WindowPtr pParent;
ScreenPtr pScreen;
ScreenSaverScreenPrivatePtr pPriv = 0;
ScreenSaverAttrPtr pAttr = 0;
int ret, len, class, bw, depth;
unsigned long visual;
int idepth, ivisual;... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,959 | SendScreenSaverNotify(ScreenPtr pScreen, int state, Bool forced)
{
ScreenSaverScreenPrivatePtr pPriv;
ScreenSaverEventPtr pEv;
unsigned long mask;
int kind;
UpdateCurrentTimeIf();
mask = ScreenSaverNotifyMask;
if (state == ScreenSaverCycle)
mask = ScreenSaverCycleMask;
pScreen =... | Exec Code | 0 | SendScreenSaverNotify(ScreenPtr pScreen, int state, Bool forced)
{
ScreenSaverScreenPrivatePtr pPriv;
ScreenSaverEventPtr pEv;
unsigned long mask;
int kind;
UpdateCurrentTimeIf();
mask = ScreenSaverNotifyMask;
if (state == ScreenSaverCycle)
mask = ScreenSaverCycleMask;
pScreen =... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,960 | UninstallSaverColormap(ScreenPtr pScreen)
{
SetupScreen(pScreen);
ColormapPtr pCmap;
int rc;
if (pPriv && pPriv->installedMap != None) {
rc = dixLookupResourceByType((void **) &pCmap, pPriv->installedMap,
RT_COLORMAP, serverClient,
... | Exec Code | 0 | UninstallSaverColormap(ScreenPtr pScreen)
{
SetupScreen(pScreen);
ColormapPtr pCmap;
int rc;
if (pPriv && pPriv->installedMap != None) {
rc = dixLookupResourceByType((void **) &pCmap, pPriv->installedMap,
RT_COLORMAP, serverClient,
... | @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,961 | getEventMask(ScreenPtr pScreen, ClientPtr client)
{
SetupScreen(pScreen);
ScreenSaverEventPtr pEv;
if (!pPriv)
return 0;
for (pEv = pPriv->events; pEv; pEv = pEv->next)
if (pEv->client == client)
return pEv->mask;
return 0;
}
| Exec Code | 0 | getEventMask(ScreenPtr pScreen, ClientPtr client)
{
SetupScreen(pScreen);
ScreenSaverEventPtr pEv;
if (!pPriv)
return 0;
for (pEv = pPriv->events; pEv; pEv = pEv->next)
if (pEv->client == client)
return pEv->mask;
return 0;
}
| @@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
PanoramiXRes *draw;
int rc, i;
+ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
+
rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
XRC_DRAWABLE, client, D... | CWE-20 | null | null |
13,962 | AddFragment(struct xorg_list *frags, int bytes)
{
FragmentList *f = malloc(sizeof(FragmentList) + bytes);
if (!f) {
return NULL;
} else {
f->bytes = bytes;
xorg_list_add(&f->l, frags->prev);
return (char*) f + sizeof(*f);
}
}
| Exec Code | 0 | AddFragment(struct xorg_list *frags, int bytes)
{
FragmentList *f = malloc(sizeof(FragmentList) + bytes);
if (!f) {
return NULL;
} else {
f->bytes = bytes;
xorg_list_add(&f->l, frags->prev);
return (char*) f + sizeof(*f);
}
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,963 | AddResourceSizeValue(void *ptr, XID id, RESTYPE type, void *cdata)
{
ConstructResourceBytesCtx *ctx = cdata;
if (ctx->status == Success &&
!ht_find(ctx->visitedResources, &id)) {
Bool ok = TRUE;
HashTable ht;
HtGenericHashSetupRec htSetup = {
.keySize = sizeof(void*)
... | Exec Code | 0 | AddResourceSizeValue(void *ptr, XID id, RESTYPE type, void *cdata)
{
ConstructResourceBytesCtx *ctx = cdata;
if (ctx->status == Success &&
!ht_find(ctx->visitedResources, &id)) {
Bool ok = TRUE;
HashTable ht;
HtGenericHashSetupRec htSetup = {
.keySize = sizeof(void*)
... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,964 | AddResourceSizeValueByResource(void *ptr, XID id, RESTYPE type, void *cdata)
{
ConstructResourceBytesCtx *ctx = cdata;
xXResResourceIdSpec *spec = ctx->curSpec;
if ((!spec->type || spec->type == type) &&
(!spec->resource || spec->resource == id)) {
AddResourceSizeValue(ptr, id, type, ctx);
... | Exec Code | 0 | AddResourceSizeValueByResource(void *ptr, XID id, RESTYPE type, void *cdata)
{
ConstructResourceBytesCtx *ctx = cdata;
xXResResourceIdSpec *spec = ctx->curSpec;
if ((!spec->type || spec->type == type) &&
(!spec->resource || spec->resource == id)) {
AddResourceSizeValue(ptr, id, type, ctx);
... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,965 | AddSubResourceSizeSpec(void *value,
XID id,
RESTYPE type,
void *cdata)
{
ConstructResourceBytesCtx *ctx = cdata;
if (ctx->status == Success) {
xXResResourceSizeSpec **prevCrossRef =
ht_find(ctx->visitedSubResources, &value);... | Exec Code | 0 | AddSubResourceSizeSpec(void *value,
XID id,
RESTYPE type,
void *cdata)
{
ConstructResourceBytesCtx *ctx = cdata;
if (ctx->status == Success) {
xXResResourceSizeSpec **prevCrossRef =
ht_find(ctx->visitedSubResources, &value);... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,966 | ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
ConstructClientIdCtx *ctx)
{
xXResClientIdValue rep;
rep.spec.client = client->clientAsMask;
if (client->swapped) {
swapl (&rep.spec.client);
}
if (WillConstructMask(client, mask, ctx, X_XRes... | Exec Code | 0 | ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
ConstructClientIdCtx *ctx)
{
xXResClientIdValue rep;
rep.spec.client = client->clientAsMask;
if (client->swapped) {
swapl (&rep.spec.client);
}
if (WillConstructMask(client, mask, ctx, X_XRes... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,967 | ConstructClientIds(ClientPtr client,
int numSpecs, xXResClientIdSpec* specs,
ConstructClientIdCtx *ctx)
{
int specIdx;
for (specIdx = 0; specIdx < numSpecs; ++specIdx) {
if (specs[specIdx].client == 0) {
int c;
for (c = 0; c < currentMaxClie... | Exec Code | 0 | ConstructClientIds(ClientPtr client,
int numSpecs, xXResClientIdSpec* specs,
ConstructClientIdCtx *ctx)
{
int specIdx;
for (specIdx = 0; specIdx < numSpecs; ++specIdx) {
if (specs[specIdx].client == 0) {
int c;
for (c = 0; c < currentMaxClie... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,968 | ConstructClientResourceBytes(ClientPtr aboutClient,
ConstructResourceBytesCtx *ctx)
{
int specIdx;
for (specIdx = 0; specIdx < ctx->numSpecs; ++specIdx) {
xXResResourceIdSpec* spec = ctx->specs + specIdx;
if (spec->resource) {
/* these specs are handled e... | Exec Code | 0 | ConstructClientResourceBytes(ClientPtr aboutClient,
ConstructResourceBytesCtx *ctx)
{
int specIdx;
for (specIdx = 0; specIdx < ctx->numSpecs; ++specIdx) {
xXResResourceIdSpec* spec = ctx->specs + specIdx;
if (spec->resource) {
/* these specs are handled e... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,969 | ConstructResourceBytesByResource(XID aboutClient, ConstructResourceBytesCtx *ctx)
{
int specIdx;
for (specIdx = 0; specIdx < ctx->numSpecs; ++specIdx) {
xXResResourceIdSpec *spec = ctx->specs + specIdx;
if (spec->resource) {
int cid = CLIENT_ID(spec->resource);
if (cid < ... | Exec Code | 0 | ConstructResourceBytesByResource(XID aboutClient, ConstructResourceBytesCtx *ctx)
{
int specIdx;
for (specIdx = 0; specIdx < ctx->numSpecs; ++specIdx) {
xXResResourceIdSpec *spec = ctx->specs + specIdx;
if (spec->resource) {
int cid = CLIENT_ID(spec->resource);
if (cid < ... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,970 | DestroyConstructClientIdCtx(ConstructClientIdCtx *ctx)
{
DestroyFragments(&ctx->response);
}
| Exec Code | 0 | DestroyConstructClientIdCtx(ConstructClientIdCtx *ctx)
{
DestroyFragments(&ctx->response);
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,971 | DestroyConstructResourceBytesCtx(ConstructResourceBytesCtx *ctx)
{
DestroyFragments(&ctx->response);
ht_destroy(ctx->visitedResources);
}
| Exec Code | 0 | DestroyConstructResourceBytesCtx(ConstructResourceBytesCtx *ctx)
{
DestroyFragments(&ctx->response);
ht_destroy(ctx->visitedResources);
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,972 | DestroyFragments(struct xorg_list *frags)
{
FragmentList *it, *tmp;
xorg_list_for_each_entry_safe(it, tmp, frags, l) {
xorg_list_del(&it->l);
free(it);
}
}
| Exec Code | 0 | DestroyFragments(struct xorg_list *frags)
{
FragmentList *it, *tmp;
xorg_list_for_each_entry_safe(it, tmp, frags, l) {
xorg_list_del(&it->l);
free(it);
}
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,973 | InitConstructClientIdCtx(ConstructClientIdCtx *ctx)
{
ctx->numIds = 0;
ctx->resultBytes = 0;
xorg_list_init(&ctx->response);
memset(ctx->sentClientMasks, 0, sizeof(ctx->sentClientMasks));
}
| Exec Code | 0 | InitConstructClientIdCtx(ConstructClientIdCtx *ctx)
{
ctx->numIds = 0;
ctx->resultBytes = 0;
xorg_list_init(&ctx->response);
memset(ctx->sentClientMasks, 0, sizeof(ctx->sentClientMasks));
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,974 | ProcResDispatch(ClientPtr client)
{
REQUEST(xReq);
switch (stuff->data) {
case X_XResQueryVersion:
return ProcXResQueryVersion(client);
case X_XResQueryClients:
return ProcXResQueryClients(client);
case X_XResQueryClientResources:
return ProcXResQueryClientResources(client);
... | Exec Code | 0 | ProcResDispatch(ClientPtr client)
{
REQUEST(xReq);
switch (stuff->data) {
case X_XResQueryVersion:
return ProcXResQueryVersion(client);
case X_XResQueryClients:
return ProcXResQueryClients(client);
case X_XResQueryClientResources:
return ProcXResQueryClientResources(client);
... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,975 | ProcXResQueryClientPixmapBytes(ClientPtr client)
{
REQUEST(xXResQueryClientPixmapBytesReq);
xXResQueryClientPixmapBytesReply rep;
int clientID;
unsigned long bytes;
REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq);
clientID = CLIENT_ID(stuff->xid);
if ((clientID >= currentMaxClients) ||... | Exec Code | 0 | ProcXResQueryClientPixmapBytes(ClientPtr client)
{
REQUEST(xXResQueryClientPixmapBytesReq);
xXResQueryClientPixmapBytesReply rep;
int clientID;
unsigned long bytes;
REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq);
clientID = CLIENT_ID(stuff->xid);
if ((clientID >= currentMaxClients) ||... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,976 | ProcXResQueryClientResources(ClientPtr client)
{
REQUEST(xXResQueryClientResourcesReq);
xXResQueryClientResourcesReply rep;
int i, clientID, num_types;
int *counts;
REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq);
clientID = CLIENT_ID(stuff->xid);
if ((clientID >= currentMaxClients) || !... | Exec Code | 0 | ProcXResQueryClientResources(ClientPtr client)
{
REQUEST(xXResQueryClientResourcesReq);
xXResQueryClientResourcesReply rep;
int i, clientID, num_types;
int *counts;
REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq);
clientID = CLIENT_ID(stuff->xid);
if ((clientID >= currentMaxClients) || !... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,977 | ProcXResQueryClients(ClientPtr client)
{
/* REQUEST(xXResQueryClientsReq); */
xXResQueryClientsReply rep;
int *current_clients;
int i, num_clients;
REQUEST_SIZE_MATCH(xXResQueryClientsReq);
current_clients = xallocarray(currentMaxClients, sizeof(int));
num_clients = 0;
for (i = 0; i <... | Exec Code | 0 | ProcXResQueryClients(ClientPtr client)
{
/* REQUEST(xXResQueryClientsReq); */
xXResQueryClientsReply rep;
int *current_clients;
int i, num_clients;
REQUEST_SIZE_MATCH(xXResQueryClientsReq);
current_clients = xallocarray(currentMaxClients, sizeof(int));
num_clients = 0;
for (i = 0; i <... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,978 | ProcXResQueryVersion(ClientPtr client)
{
xXResQueryVersionReply rep = {
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = 0,
.server_major = SERVER_XRES_MAJOR_VERSION,
.server_minor = SERVER_XRES_MINOR_VERSION
};
REQUEST_SIZE_MATCH(xXResQueryVersionReq);... | Exec Code | 0 | ProcXResQueryVersion(ClientPtr client)
{
xXResQueryVersionReply rep = {
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = 0,
.server_major = SERVER_XRES_MAJOR_VERSION,
.server_minor = SERVER_XRES_MINOR_VERSION
};
REQUEST_SIZE_MATCH(xXResQueryVersionReq);... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,979 | ResFindAllRes(void *value, XID id, RESTYPE type, void *cdata)
{
int *counts = (int *) cdata;
counts[(type & TypeMask) - 1]++;
}
| Exec Code | 0 | ResFindAllRes(void *value, XID id, RESTYPE type, void *cdata)
{
int *counts = (int *) cdata;
counts[(type & TypeMask) - 1]++;
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,980 | ResFindResourcePixmaps(void *value, XID id, RESTYPE type, void *cdata)
{
SizeType sizeFunc = GetResourceTypeSizeFunc(type);
ResourceSizeRec size = { 0, 0, 0 };
unsigned long *bytes = cdata;
sizeFunc(value, id, &size);
*bytes += size.pixmapRefSize;
}
| Exec Code | 0 | ResFindResourcePixmaps(void *value, XID id, RESTYPE type, void *cdata)
{
SizeType sizeFunc = GetResourceTypeSizeFunc(type);
ResourceSizeRec size = { 0, 0, 0 };
unsigned long *bytes = cdata;
sizeFunc(value, id, &size);
*bytes += size.pixmapRefSize;
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,981 | SProcXResQueryClientIds (ClientPtr client)
{
REQUEST(xXResQueryClientIdsReq);
REQUEST_AT_LEAST_SIZE (xXResQueryClientIdsReq);
swapl(&stuff->numSpecs);
return ProcXResQueryClientIds(client);
}
| Exec Code | 0 | SProcXResQueryClientIds (ClientPtr client)
{
REQUEST(xXResQueryClientIdsReq);
REQUEST_AT_LEAST_SIZE (xXResQueryClientIdsReq);
swapl(&stuff->numSpecs);
return ProcXResQueryClientIds(client);
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,982 | SProcXResQueryClientPixmapBytes(ClientPtr client)
{
REQUEST(xXResQueryClientPixmapBytesReq);
REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq);
swapl(&stuff->xid);
return ProcXResQueryClientPixmapBytes(client);
}
| Exec Code | 0 | SProcXResQueryClientPixmapBytes(ClientPtr client)
{
REQUEST(xXResQueryClientPixmapBytesReq);
REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq);
swapl(&stuff->xid);
return ProcXResQueryClientPixmapBytes(client);
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,983 | SProcXResQueryClientResources(ClientPtr client)
{
REQUEST(xXResQueryClientResourcesReq);
REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq);
swapl(&stuff->xid);
return ProcXResQueryClientResources(client);
}
| Exec Code | 0 | SProcXResQueryClientResources(ClientPtr client)
{
REQUEST(xXResQueryClientResourcesReq);
REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq);
swapl(&stuff->xid);
return ProcXResQueryClientResources(client);
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,984 | SProcXResQueryVersion(ClientPtr client)
{
REQUEST_SIZE_MATCH(xXResQueryVersionReq);
return ProcXResQueryVersion(client);
}
| Exec Code | 0 | SProcXResQueryVersion(ClientPtr client)
{
REQUEST_SIZE_MATCH(xXResQueryVersionReq);
return ProcXResQueryVersion(client);
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,985 | SwapXResQueryResourceBytes(struct xorg_list *response)
{
struct xorg_list *it = response->next;
int c;
while (it != response) {
xXResResourceSizeValue *value = FRAGMENT_DATA(it);
it = it->next;
for (c = 0; c < value->numCrossReferences; ++c) {
xXResResourceSizeSpec *spec... | Exec Code | 0 | SwapXResQueryResourceBytes(struct xorg_list *response)
{
struct xorg_list *it = response->next;
int c;
while (it != response) {
xXResResourceSizeValue *value = FRAGMENT_DATA(it);
it = it->next;
for (c = 0; c < value->numCrossReferences; ++c) {
xXResResourceSizeSpec *spec... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,986 | SwapXResResourceIdSpec(xXResResourceIdSpec *spec)
{
swapl(&spec->resource);
swapl(&spec->type);
}
| Exec Code | 0 | SwapXResResourceIdSpec(xXResResourceIdSpec *spec)
{
swapl(&spec->resource);
swapl(&spec->type);
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,987 | SwapXResResourceSizeValue(xXResResourceSizeValue *rep)
{
SwapXResResourceSizeSpec(&rep->size);
swapl(&rep->numCrossReferences);
}
| Exec Code | 0 | SwapXResResourceSizeValue(xXResResourceSizeValue *rep)
{
SwapXResResourceSizeSpec(&rep->size);
swapl(&rep->numCrossReferences);
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,988 | WillConstructMask(ClientPtr client, CARD32 mask,
ConstructClientIdCtx *ctx, int sendMask)
{
if ((!mask || (mask & sendMask))
&& !(ctx->sentClientMasks[client->index] & sendMask)) {
ctx->sentClientMasks[client->index] |= sendMask;
return TRUE;
} else {
return FAL... | Exec Code | 0 | WillConstructMask(ClientPtr client, CARD32 mask,
ConstructClientIdCtx *ctx, int sendMask)
{
if ((!mask || (mask & sendMask))
&& !(ctx->sentClientMasks[client->index] & sendMask)) {
ctx->sentClientMasks[client->index] |= sendMask;
return TRUE;
} else {
return FAL... | @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,989 | WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags)
{
FragmentList *it;
xorg_list_for_each_entry(it, frags, l) {
WriteToClient(client, it->bytes, (char*) it + sizeof(*it));
}
}
| Exec Code | 0 | WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags)
{
FragmentList *it;
xorg_list_for_each_entry(it, frags, l) {
WriteToClient(client, it->bytes, (char*) it + sizeof(*it));
}
}
| @@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
ConstructResourceBytesCtx ctx;
REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
+ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
+ return BadLength;
REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
... | CWE-20 | null | null |
13,990 | ProcXvDispatch(ClientPtr client)
{
REQUEST(xReq);
UpdateCurrentTime();
if (stuff->data >= xvNumRequests) {
return BadRequest;
}
return XvProcVector[stuff->data] (client);
}
| Exec Code | 0 | ProcXvDispatch(ClientPtr client)
{
REQUEST(xReq);
UpdateCurrentTime();
if (stuff->data >= xvNumRequests) {
return BadRequest;
}
return XvProcVector[stuff->data] (client);
}
| @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,991 | ProcXvGetPortAttribute(ClientPtr client)
{
INT32 value;
int status;
XvPortPtr pPort;
xvGetPortAttributeReply rep;
REQUEST(xvGetPortAttributeReq);
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess);
if (!ValidAtom(stuff->attribute)) {
... | Exec Code | 0 | ProcXvGetPortAttribute(ClientPtr client)
{
INT32 value;
int status;
XvPortPtr pPort;
xvGetPortAttributeReply rep;
REQUEST(xvGetPortAttributeReq);
REQUEST_SIZE_MATCH(xvGetPortAttributeReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess);
if (!ValidAtom(stuff->attribute)) {
... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,992 | ProcXvGetStill(ClientPtr client)
{
DrawablePtr pDraw;
XvPortPtr pPort;
GCPtr pGC;
int status;
REQUEST(xvGetStillReq);
REQUEST_SIZE_MATCH(xvGetStillReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
if (!(pPor... | Exec Code | 0 | ProcXvGetStill(ClientPtr client)
{
DrawablePtr pDraw;
XvPortPtr pPort;
GCPtr pGC;
int status;
REQUEST(xvGetStillReq);
REQUEST_SIZE_MATCH(xvGetStillReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
if (!(pPor... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,993 | ProcXvGetVideo(ClientPtr client)
{
DrawablePtr pDraw;
XvPortPtr pPort;
GCPtr pGC;
int status;
REQUEST(xvGetVideoReq);
REQUEST_SIZE_MATCH(xvGetVideoReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
if (!(pPor... | Exec Code | 0 | ProcXvGetVideo(ClientPtr client)
{
DrawablePtr pDraw;
XvPortPtr pPort;
GCPtr pGC;
int status;
REQUEST(xvGetVideoReq);
REQUEST_SIZE_MATCH(xvGetVideoReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
if (!(pPor... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,994 | ProcXvGrabPort(ClientPtr client)
{
int result, status;
XvPortPtr pPort;
xvGrabPortReply rep;
REQUEST(xvGrabPortReq);
REQUEST_SIZE_MATCH(xvGrabPortReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
status = XvdiGrabPort(client, pPort, stuff->time, &result);
if (status != Succe... | Exec Code | 0 | ProcXvGrabPort(ClientPtr client)
{
int result, status;
XvPortPtr pPort;
xvGrabPortReply rep;
REQUEST(xvGrabPortReq);
REQUEST_SIZE_MATCH(xvGrabPortReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
status = XvdiGrabPort(client, pPort, stuff->time, &result);
if (status != Succe... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,995 | ProcXvPutStill(ClientPtr client)
{
DrawablePtr pDraw;
XvPortPtr pPort;
GCPtr pGC;
int status;
REQUEST(xvPutStillReq);
REQUEST_SIZE_MATCH(xvPutStillReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
if (!(pPo... | Exec Code | 0 | ProcXvPutStill(ClientPtr client)
{
DrawablePtr pDraw;
XvPortPtr pPort;
GCPtr pGC;
int status;
REQUEST(xvPutStillReq);
REQUEST_SIZE_MATCH(xvPutStillReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
if (!(pPo... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,996 | ProcXvPutVideo(ClientPtr client)
{
DrawablePtr pDraw;
XvPortPtr pPort;
GCPtr pGC;
int status;
REQUEST(xvPutVideoReq);
REQUEST_SIZE_MATCH(xvPutVideoReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
if (!(pPo... | Exec Code | 0 | ProcXvPutVideo(ClientPtr client)
{
DrawablePtr pDraw;
XvPortPtr pPort;
GCPtr pGC;
int status;
REQUEST(xvPutVideoReq);
REQUEST_SIZE_MATCH(xvPutVideoReq);
VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
if (!(pPo... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,997 | ProcXvQueryAdaptors(ClientPtr client)
{
xvFormat format;
xvAdaptorInfo ainfo;
xvQueryAdaptorsReply rep;
int totalSize, na, nf, rc;
int nameSize;
XvAdaptorPtr pa;
XvFormatPtr pf;
WindowPtr pWin;
ScreenPtr pScreen;
XvScreenPtr pxvs;
REQUEST(xvQueryAdaptorsReq);
REQUEST_SIZ... | Exec Code | 0 | ProcXvQueryAdaptors(ClientPtr client)
{
xvFormat format;
xvAdaptorInfo ainfo;
xvQueryAdaptorsReply rep;
int totalSize, na, nf, rc;
int nameSize;
XvAdaptorPtr pa;
XvFormatPtr pf;
WindowPtr pWin;
ScreenPtr pScreen;
XvScreenPtr pxvs;
REQUEST(xvQueryAdaptorsReq);
REQUEST_SIZ... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,998 | ProcXvQueryBestSize(ClientPtr client)
{
unsigned int actual_width, actual_height;
XvPortPtr pPort;
xvQueryBestSizeReply rep;
REQUEST(xvQueryBestSizeReq);
REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
(*pPort->pAdaptor->ddQueryBestSize) (pPort... | Exec Code | 0 | ProcXvQueryBestSize(ClientPtr client)
{
unsigned int actual_width, actual_height;
XvPortPtr pPort;
xvQueryBestSizeReply rep;
REQUEST(xvQueryBestSizeReq);
REQUEST_SIZE_MATCH(xvQueryBestSizeReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess);
(*pPort->pAdaptor->ddQueryBestSize) (pPort... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
13,999 | ProcXvQueryEncodings(ClientPtr client)
{
xvEncodingInfo einfo;
xvQueryEncodingsReply rep;
int totalSize;
int nameSize;
XvPortPtr pPort;
int ne;
XvEncodingPtr pe;
REQUEST(xvQueryEncodingsReq);
REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadA... | Exec Code | 0 | ProcXvQueryEncodings(ClientPtr client)
{
xvEncodingInfo einfo;
xvQueryEncodingsReply rep;
int totalSize;
int nameSize;
XvPortPtr pPort;
int ne;
XvEncodingPtr pe;
REQUEST(xvQueryEncodingsReq);
REQUEST_SIZE_MATCH(xvQueryEncodingsReq);
VALIDATE_XV_PORT(stuff->port, pPort, DixReadA... | @@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
{
REQUEST(xvShmPutImageReq);
PanoramiXRes *draw, *gc, *port;
- Bool send_event = stuff->send_event;
+ Bool send_event;
Bool isRoot;
int result, i, x, y;
REQUEST_SIZE_MATCH(xvShmPutImageReq);
+ send_event = stuff->send... | CWE-20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.