idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
11,200
gsicc_load_namedcolor_buffer(cmm_profile_t *profile, stream *s, gs_memory_t *memory) { int num_bytes,profile_size; unsigned char *buffer_ptr; int code; code = srewind(s); if (code < 0) return code; code = sfseek...
Exec Code
0
gsicc_load_namedcolor_buffer(cmm_profile_t *profile, stream *s, gs_memory_t *memory) { int num_bytes,profile_size; unsigned char *buffer_ptr; int code; code = srewind(s); if (code < 0) return code; code = sfseek...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,201
gsicc_load_profile_buffer(cmm_profile_t *profile, stream *s, gs_memory_t *memory) { int num_bytes,profile_size; unsigned char *buffer_ptr; int code; code = srewind(s); /* Work around for issue with sfread return 0 bytes ...
Exec Code
0
gsicc_load_profile_buffer(cmm_profile_t *profile, stream *s, gs_memory_t *memory) { int num_bytes,profile_size; unsigned char *buffer_ptr; int code; code = srewind(s); /* Work around for issue with sfread return 0 bytes ...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,202
gsicc_manager_finalize(const gs_memory_t *memory, void * vptr) { gsicc_manager_t *icc_man = (gsicc_manager_t *)vptr; gsicc_manager_free_contents(icc_man, "gsicc_manager_finalize"); }
Exec Code
0
gsicc_manager_finalize(const gs_memory_t *memory, void * vptr) { gsicc_manager_t *icc_man = (gsicc_manager_t *)vptr; gsicc_manager_free_contents(icc_man, "gsicc_manager_finalize"); }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,203
static void gsicc_manager_free_contents(gsicc_manager_t *icc_manager, client_name_t cname) { int k; gsicc_devicen_entry_t *device_n, *device_n_next; rc_decrement(icc_manager->default_cmyk, "gsicc_manager_free_contents"); rc_decrement(icc_manager->default_gray, "gsicc_m...
Exec Code
0
static void gsicc_manager_free_contents(gsicc_manager_t *icc_manager, client_name_t cname) { int k; gsicc_devicen_entry_t *device_n, *device_n_next; rc_decrement(icc_manager->default_cmyk, "gsicc_manager_free_contents"); rc_decrement(icc_manager->default_gray, "gsicc_m...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,204
gsicc_manager_new(gs_memory_t *memory) { gsicc_manager_t *result; /* Allocated in stable gc memory. This done since the profiles may be introduced late in the process. */ result = gs_alloc_struct(memory->stable_memory, gsicc_manager_t, &st_gsicc_manager, "gsicc_manager_...
Exec Code
0
gsicc_manager_new(gs_memory_t *memory) { gsicc_manager_t *result; /* Allocated in stable gc memory. This done since the profiles may be introduced late in the process. */ result = gs_alloc_struct(memory->stable_memory, gsicc_manager_t, &st_gsicc_manager, "gsicc_manager_...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,205
gsicc_new_colorname(gs_memory_t *memory) { gsicc_colorname_t *result; result = gs_alloc_struct(memory,gsicc_colorname_t, &st_gsicc_colorname, "gsicc_new_colorname"); if (result == NULL) return NULL; result->length = 0; result->name = NULL; result->next = NULL; return...
Exec Code
0
gsicc_new_colorname(gs_memory_t *memory) { gsicc_colorname_t *result; result = gs_alloc_struct(memory,gsicc_colorname_t, &st_gsicc_colorname, "gsicc_new_colorname"); if (result == NULL) return NULL; result->length = 0; result->name = NULL; result->next = NULL; return...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,206
gsicc_new_device_profile_array(gs_memory_t *memory) { cmm_dev_profile_t *result; int k; if_debug0m(gs_debug_flag_icc,memory,"[icc] Allocating device profile struct\n"); result = (cmm_dev_profile_t *) gs_alloc_bytes(memory->non_gc_memory, sizeof(cmm_dev_profil...
Exec Code
0
gsicc_new_device_profile_array(gs_memory_t *memory) { cmm_dev_profile_t *result; int k; if_debug0m(gs_debug_flag_icc,memory,"[icc] Allocating device profile struct\n"); result = (cmm_dev_profile_t *) gs_alloc_bytes(memory->non_gc_memory, sizeof(cmm_dev_profil...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,207
gsicc_new_devicen(gsicc_manager_t *icc_manager) { /* Allocate a new deviceN ICC profile entry in the deviceN list */ gsicc_devicen_entry_t *device_n_entry = gs_alloc_struct(icc_manager->memory, gsicc_devicen_entry_t, &st_gsicc_devicen_entry, "gsicc_new_devicen"); if (device_n_entry == NU...
Exec Code
0
gsicc_new_devicen(gsicc_manager_t *icc_manager) { /* Allocate a new deviceN ICC profile entry in the deviceN list */ gsicc_devicen_entry_t *device_n_entry = gs_alloc_struct(icc_manager->memory, gsicc_devicen_entry_t, &st_gsicc_devicen_entry, "gsicc_new_devicen"); if (device_n_entry == NU...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,208
gsicc_new_iccsmask(gs_memory_t *memory) { gsicc_smask_t *result; result = (gsicc_smask_t *) gs_alloc_struct(memory, gsicc_smask_t, &st_gsicc_smask, "gsicc_new_iccsmask"); if (result != NULL) { result->smask_gray = NULL; result->smask_rgb = NULL; result->smask_cmyk = NULL; re...
Exec Code
0
gsicc_new_iccsmask(gs_memory_t *memory) { gsicc_smask_t *result; result = (gsicc_smask_t *) gs_alloc_struct(memory, gsicc_smask_t, &st_gsicc_smask, "gsicc_new_iccsmask"); if (result != NULL) { result->smask_gray = NULL; result->smask_rgb = NULL; result->smask_cmyk = NULL; re...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,209
gsicc_new_srcgtag_profile(gs_memory_t *memory) { cmm_srcgtag_profile_t *result; int k; result = (cmm_srcgtag_profile_t *) gs_alloc_bytes(memory->non_gc_memory, sizeof(cmm_srcgtag_profile_t), "gsicc_new_srcgtag_profile")...
Exec Code
0
gsicc_new_srcgtag_profile(gs_memory_t *memory) { cmm_srcgtag_profile_t *result; int k; result = (cmm_srcgtag_profile_t *) gs_alloc_bytes(memory->non_gc_memory, sizeof(cmm_srcgtag_profile_t), "gsicc_new_srcgtag_profile")...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,210
gsicc_profile_new(stream *s, gs_memory_t *memory, const char* pname, int namelen) { cmm_profile_t *result; int code; char *nameptr = NULL; gs_memory_t *mem_nongc = memory->non_gc_memory; result = (cmm_profile_t*) gs_alloc_bytes(mem_nongc, sizeof(cmm_profile_t), ...
Exec Code
0
gsicc_profile_new(stream *s, gs_memory_t *memory, const char* pname, int namelen) { cmm_profile_t *result; int code; char *nameptr = NULL; gs_memory_t *mem_nongc = memory->non_gc_memory; result = (cmm_profile_t*) gs_alloc_bytes(mem_nongc, sizeof(cmm_profile_t), ...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,211
gsicc_profile_reference(cmm_profile_t *icc_profile, int delta) { if (icc_profile != NULL) rc_adjust(icc_profile, delta, "gsicc_profile_reference"); }
Exec Code
0
gsicc_profile_reference(cmm_profile_t *icc_profile, int delta) { if (icc_profile != NULL) rc_adjust(icc_profile, delta, "gsicc_profile_reference"); }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,212
gsicc_profile_serialize(gsicc_serialized_profile_t *profile_data, cmm_profile_t *icc_profile) { if (icc_profile == NULL) return; memcpy(profile_data, icc_profile, GSICC_SERIALIZED_SIZE); }
Exec Code
0
gsicc_profile_serialize(gsicc_serialized_profile_t *profile_data, cmm_profile_t *icc_profile) { if (icc_profile == NULL) return; memcpy(profile_data, icc_profile, GSICC_SERIALIZED_SIZE); }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,213
gsicc_read_serial_icc(gx_device *dev, int64_t icc_hashcode) { cmm_profile_t *profile; int64_t position; int size; int code; gx_device_clist_reader *pcrdev = (gx_device_clist_reader*) dev; /* Create a new ICC profile structure */ profile = gsicc_profile_new(NULL, pcrdev->memory, NULL, 0); ...
Exec Code
0
gsicc_read_serial_icc(gx_device *dev, int64_t icc_hashcode) { cmm_profile_t *profile; int64_t position; int size; int code; gx_device_clist_reader *pcrdev = (gx_device_clist_reader*) dev; /* Create a new ICC profile structure */ profile = gsicc_profile_new(NULL, pcrdev->memory, NULL, 0); ...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,214
gsicc_set_default_cs_value(cmm_profile_t *picc_profile, gs_gstate *pgs) { gsicc_manager_t *icc_manager = pgs->icc_manager; int64_t hashcode = picc_profile->hashcode; if ( picc_profile->default_match == DEFAULT_NONE ) { switch ( picc_profile->data_cs ) { case gsGRAY: if (...
Exec Code
0
gsicc_set_default_cs_value(cmm_profile_t *picc_profile, gs_gstate *pgs) { gsicc_manager_t *icc_manager = pgs->icc_manager; int64_t hashcode = picc_profile->hashcode; if ( picc_profile->default_match == DEFAULT_NONE ) { switch ( picc_profile->data_cs ) { case gsGRAY: if (...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,215
gsicc_set_device_blackpreserve(gx_device *dev, gsicc_blackpreserve_t blackpreserve, gsicc_profile_types_t profile_type) { int code; cmm_dev_profile_t *profile_struct; if (dev->procs.get_profile == NULL) { profile_struct = dev->icc_struct; } else { code = ...
Exec Code
0
gsicc_set_device_blackpreserve(gx_device *dev, gsicc_blackpreserve_t blackpreserve, gsicc_profile_types_t profile_type) { int code; cmm_dev_profile_t *profile_struct; if (dev->procs.get_profile == NULL) { profile_struct = dev->icc_struct; } else { code = ...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,216
gsicc_set_device_profile(gx_device * pdev, gs_memory_t * mem, char *file_name, gsicc_profile_types_t pro_enum) { cmm_profile_t *icc_profile; stream *str; int code; /* This is slightly silly, we have a device method for 'get_profile' we really ought to * have one for 'set_p...
Exec Code
0
gsicc_set_device_profile(gx_device * pdev, gs_memory_t * mem, char *file_name, gsicc_profile_types_t pro_enum) { cmm_profile_t *icc_profile; stream *str; int code; /* This is slightly silly, we have a device method for 'get_profile' we really ought to * have one for 'set_p...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,217
gsicc_set_device_profile_colorants(gx_device *dev, char *name_str) { int code; cmm_dev_profile_t *profile_struct; gsicc_colorname_t *name_entry; gsicc_colorname_t **curr_entry; gs_memory_t *mem; char *temp_ptr, *last = NULL; int done; gsicc_namelist_t *spot_names; char *pch; int ...
Exec Code
0
gsicc_set_device_profile_colorants(gx_device *dev, char *name_str) { int code; cmm_dev_profile_t *profile_struct; gsicc_colorname_t *name_entry; gsicc_colorname_t **curr_entry; gs_memory_t *mem; char *temp_ptr, *last = NULL; int done; gsicc_namelist_t *spot_names; char *pch; int ...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,218
gsicc_set_device_profile_intent(gx_device *dev, gsicc_rendering_intents_t intent, gsicc_profile_types_t profile_type) { int code; cmm_dev_profile_t *profile_struct; if (dev->procs.get_profile == NULL) { profile_struct = dev->icc_struct; } else { code = de...
Exec Code
0
gsicc_set_device_profile_intent(gx_device *dev, gsicc_rendering_intents_t intent, gsicc_profile_types_t profile_type) { int code; cmm_dev_profile_t *profile_struct; if (dev->procs.get_profile == NULL) { profile_struct = dev->icc_struct; } else { code = de...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,219
gsicc_set_gscs_profile(gs_color_space *pcs, cmm_profile_t *icc_profile, gs_memory_t * mem) { if (pcs == NULL) return -1; #if ICC_DUMP if (icc_profile->buffer) { dump_icc_buffer(icc_profile->buffer_size, "set_gscs", icc_profile->buffer); glob...
Exec Code
0
gsicc_set_gscs_profile(gs_color_space *pcs, cmm_profile_t *icc_profile, gs_memory_t * mem) { if (pcs == NULL) return -1; #if ICC_DUMP if (icc_profile->buffer) { dump_icc_buffer(icc_profile->buffer_size, "set_gscs", icc_profile->buffer); glob...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,220
gsicc_set_iccsmaskprofile(const char *pname, int namelen, gsicc_manager_t *icc_manager, gs_memory_t *mem) { stream *str; int code; cmm_profile_t *icc_profile; if (icc_manager == NULL) { code = gsicc_open_search(pname, namelen, mem, NULL, 0, &s...
Exec Code
0
gsicc_set_iccsmaskprofile(const char *pname, int namelen, gsicc_manager_t *icc_manager, gs_memory_t *mem) { stream *str; int code; cmm_profile_t *icc_profile; if (icc_manager == NULL) { code = gsicc_open_search(pname, namelen, mem, NULL, 0, &s...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,221
gsicc_set_profile(gsicc_manager_t *icc_manager, const char* pname, int namelen, gsicc_profile_t defaulttype) { cmm_profile_t *icc_profile; cmm_profile_t **manager_default_profile = NULL; /* quite compiler */ stream *str; gs_memory_t *mem_gc = icc_manager->memory; int code; int ...
Exec Code
0
gsicc_set_profile(gsicc_manager_t *icc_manager, const char* pname, int namelen, gsicc_profile_t defaulttype) { cmm_profile_t *icc_profile; cmm_profile_t **manager_default_profile = NULL; /* quite compiler */ stream *str; gs_memory_t *mem_gc = icc_manager->memory; int code; int ...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,222
gsicc_setrange_lab(cmm_profile_t *profile) { profile->Range.ranges[0].rmin = 0.0; profile->Range.ranges[0].rmax = 100.0; profile->Range.ranges[1].rmin = -128.0; profile->Range.ranges[1].rmax = 127.0; profile->Range.ranges[2].rmin = -128.0; profile->Range.ranges[2].rmax = 127.0; }
Exec Code
0
gsicc_setrange_lab(cmm_profile_t *profile) { profile->Range.ranges[0].rmin = 0.0; profile->Range.ranges[0].rmax = 100.0; profile->Range.ranges[1].rmin = -128.0; profile->Range.ranges[1].rmax = 127.0; profile->Range.ranges[2].rmin = -128.0; profile->Range.ranges[2].rmax = 127.0; }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,223
gsicc_smask_finalize(const gs_memory_t *memory, void * vptr) { gsicc_smask_t *iccsmask = (gsicc_smask_t *)vptr; rc_decrement(iccsmask->smask_gray, "gsicc_smask_finalize"); rc_decrement(iccsmask->smask_rgb, "gsicc_smask_finalize"); rc_decrement(iccsmask->smask_cmyk, "gsicc_smask_...
Exec Code
0
gsicc_smask_finalize(const gs_memory_t *memory, void * vptr) { gsicc_smask_t *iccsmask = (gsicc_smask_t *)vptr; rc_decrement(iccsmask->smask_gray, "gsicc_smask_finalize"); rc_decrement(iccsmask->smask_rgb, "gsicc_smask_finalize"); rc_decrement(iccsmask->smask_cmyk, "gsicc_smask_...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,224
rc_free_icc_profile(gs_memory_t * mem, void *ptr_in, client_name_t cname) { cmm_profile_t *profile = (cmm_profile_t *)ptr_in; gs_memory_t *mem_nongc = profile->memory; if_debug2m(gs_debug_flag_icc, mem, "[icc] rc decrement profile = 0x%p rc = %ld\n", ptr_in, profile->rc.ref_c...
Exec Code
0
rc_free_icc_profile(gs_memory_t * mem, void *ptr_in, client_name_t cname) { cmm_profile_t *profile = (cmm_profile_t *)ptr_in; gs_memory_t *mem_nongc = profile->memory; if_debug2m(gs_debug_flag_icc, mem, "[icc] rc decrement profile = 0x%p rc = %ld\n", ptr_in, profile->rc.ref_c...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,225
rc_free_srcgtag_profile(gs_memory_t * mem, void *ptr_in, client_name_t cname) { cmm_srcgtag_profile_t *srcgtag_profile = (cmm_srcgtag_profile_t *)ptr_in; int k; gs_memory_t *mem_nongc = srcgtag_profile->memory; if (srcgtag_profile->rc.ref_count <= 1 ) { /* Decrement any profiles. */ fo...
Exec Code
0
rc_free_srcgtag_profile(gs_memory_t * mem, void *ptr_in, client_name_t cname) { cmm_srcgtag_profile_t *srcgtag_profile = (cmm_srcgtag_profile_t *)ptr_in; int k; gs_memory_t *mem_nongc = srcgtag_profile->memory; if (srcgtag_profile->rc.ref_count <= 1 ) { /* Decrement any profiles. */ fo...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,226
rc_gsicc_manager_free(gs_memory_t * mem, void *ptr_in, client_name_t cname) { /* Ending the manager. Decrement the ref counts of the profiles and then free the structure */ gsicc_manager_t *icc_manager = (gsicc_manager_t * ) ptr_in; gs_free_object(icc_manager->memory, icc_manager, "rc_gsicc_manager...
Exec Code
0
rc_gsicc_manager_free(gs_memory_t * mem, void *ptr_in, client_name_t cname) { /* Ending the manager. Decrement the ref counts of the profiles and then free the structure */ gsicc_manager_t *icc_manager = (gsicc_manager_t * ) ptr_in; gs_free_object(icc_manager->memory, icc_manager, "rc_gsicc_manager...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,227
void errflush_nomem(void) { errflush(mem_err_print); }
Exec Code
0
void errflush_nomem(void) { errflush(mem_err_print); }
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,228
int errwrite(const gs_memory_t *mem, const char *str, int len) { int code; gs_lib_ctx_t *ctx; if (len == 0) return 0; if (mem == NULL) { #ifdef GS_THREADSAFE return 0; #else mem = mem_err_print; if (mem == NULL) return 0; #endif } ctx = mem->gs_lib_ctx...
Exec Code
0
int errwrite(const gs_memory_t *mem, const char *str, int len) { int code; gs_lib_ctx_t *ctx; if (len == 0) return 0; if (mem == NULL) { #ifdef GS_THREADSAFE return 0; #else mem = mem_err_print; if (mem == NULL) return 0; #endif } ctx = mem->gs_lib_ctx...
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,229
int errwrite_nomem(const char *str, int len) { return errwrite(mem_err_print, str, len); }
Exec Code
0
int errwrite_nomem(const char *str, int len) { return errwrite(mem_err_print, str, len); }
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,230
void *gs_lib_ctx_get_cms_context( const gs_memory_t *mem ) { if (mem == NULL) return NULL; return mem->gs_lib_ctx->cms_context; }
Exec Code
0
void *gs_lib_ctx_get_cms_context( const gs_memory_t *mem ) { if (mem == NULL) return NULL; return mem->gs_lib_ctx->cms_context; }
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,231
gs_lib_ctx_get_default_device_list(const gs_memory_t *mem, char** dev_list_str, int *list_str_len) { /* In the case the lib ctx hasn't been initialised */ if (mem && mem->gs_lib_ctx && mem->gs_lib_ctx->default_device_list) { *dev_list_str = mem->gs_lib_ctx->default_device_list; ...
Exec Code
0
gs_lib_ctx_get_default_device_list(const gs_memory_t *mem, char** dev_list_str, int *list_str_len) { /* In the case the lib ctx hasn't been initialised */ if (mem && mem->gs_lib_ctx && mem->gs_lib_ctx->default_device_list) { *dev_list_str = mem->gs_lib_ctx->default_device_list; ...
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,232
gs_lib_ctx_t *gs_lib_ctx_get_interp_instance(const gs_memory_t *mem) { if (mem == NULL) return NULL; return mem->gs_lib_ctx; }
Exec Code
0
gs_lib_ctx_t *gs_lib_ctx_get_interp_instance(const gs_memory_t *mem) { if (mem == NULL) return NULL; return mem->gs_lib_ctx; }
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,233
gs_lib_ctx_get_real_stdio(FILE **in, FILE **out, FILE **err) { *in = stdin; *out = stdout; *err = stderr; }
Exec Code
0
gs_lib_ctx_get_real_stdio(FILE **in, FILE **out, FILE **err) { *in = stdin; *out = stdout; *err = stderr; }
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,234
void gs_lib_ctx_set_cms_context( const gs_memory_t *mem, void *cms_context ) { if (mem == NULL) return; mem->gs_lib_ctx->cms_context = cms_context; }
Exec Code
0
void gs_lib_ctx_set_cms_context( const gs_memory_t *mem, void *cms_context ) { if (mem == NULL) return; mem->gs_lib_ctx->cms_context = cms_context; }
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,235
gs_lib_ctx_set_default_device_list(const gs_memory_t *mem, const char* dev_list_str, int list_str_len) { char *result; gs_lib_ctx_t *p_ctx = mem->gs_lib_ctx; gs_memory_t *ctx_mem = p_ctx->memory; int code = 0; result = (char *)gs_alloc_bytes(ctx_mem, list_str_len + 1, ...
Exec Code
0
gs_lib_ctx_set_default_device_list(const gs_memory_t *mem, const char* dev_list_str, int list_str_len) { char *result; gs_lib_ctx_t *p_ctx = mem->gs_lib_ctx; gs_memory_t *ctx_mem = p_ctx->memory; int code = 0; result = (char *)gs_alloc_bytes(ctx_mem, list_str_len + 1, ...
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,236
gs_lib_ctx_set_icc_directory(const gs_memory_t *mem_gc, const char* pname, int dir_namelen) { char *result; gs_lib_ctx_t *p_ctx = mem_gc->gs_lib_ctx; gs_memory_t *p_ctx_mem = p_ctx->memory; /* If it is already set and the incoming is the default then don't set as we are c...
Exec Code
0
gs_lib_ctx_set_icc_directory(const gs_memory_t *mem_gc, const char* pname, int dir_namelen) { char *result; gs_lib_ctx_t *p_ctx = mem_gc->gs_lib_ctx; gs_memory_t *p_ctx_mem = p_ctx->memory; /* If it is already set and the incoming is the default then don't set as we are c...
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,237
void outflush(const gs_memory_t *mem) { if (mem->gs_lib_ctx->stdout_is_redirected) { if (mem->gs_lib_ctx->stdout_to_stderr) { if (!mem->gs_lib_ctx->stderr_fn) fflush(mem->gs_lib_ctx->fstderr); } else fflush(mem->gs_lib_ctx->fstdout2); } else if...
Exec Code
0
void outflush(const gs_memory_t *mem) { if (mem->gs_lib_ctx->stdout_is_redirected) { if (mem->gs_lib_ctx->stdout_to_stderr) { if (!mem->gs_lib_ctx->stderr_fn) fflush(mem->gs_lib_ctx->fstderr); } else fflush(mem->gs_lib_ctx->fstdout2); } else if...
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,238
int outwrite(const gs_memory_t *mem, const char *str, int len) { int code; FILE *fout; gs_lib_ctx_t *pio = mem->gs_lib_ctx; if (len == 0) return 0; if (pio->stdout_is_redirected) { if (pio->stdout_to_stderr) return errwrite(mem, str, len); fout = pio->fstdout2; ...
Exec Code
0
int outwrite(const gs_memory_t *mem, const char *str, int len) { int code; FILE *fout; gs_lib_ctx_t *pio = mem->gs_lib_ctx; if (len == 0) return 0; if (pio->stdout_is_redirected) { if (pio->stdout_to_stderr) return errwrite(mem, str, len); fout = pio->fstdout2; ...
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,239
static void remove_ctx_pointers(gs_memory_t *mem) { mem->gs_lib_ctx = NULL; if (mem->stable_memory && mem->stable_memory != mem) remove_ctx_pointers(mem->stable_memory); if (mem->non_gc_memory && mem->non_gc_memory != mem) remove_ctx_pointers(mem->non_gc_memory); if (mem->thread_safe_mem...
Exec Code
0
static void remove_ctx_pointers(gs_memory_t *mem) { mem->gs_lib_ctx = NULL; if (mem->stable_memory && mem->stable_memory != mem) remove_ctx_pointers(mem->stable_memory); if (mem->non_gc_memory && mem->non_gc_memory != mem) remove_ctx_pointers(mem->non_gc_memory); if (mem->thread_safe_mem...
@@ -189,7 +189,7 @@ Failure: gscms_destroy(mem); goto Failure; } - + pio->client_check_file_permission = NULL; gp_get_realtime(pio->real_time_0); /* Set scanconverter to 1 (default) */ @@ -343,3 +343,13 @@ void errflush(const gs_memory_t *mem) fflush(mem->gs_lib_ctx->f...
CWE-20
null
null
11,240
get_minst_from_memory(const gs_memory_t *mem) { #ifdef PSI_INCLUDED extern gs_main_instance *ps_impl_get_minst( const gs_memory_t *mem ); return ps_impl_get_minst(mem); #else return (gs_main_instance*)mem->gs_lib_ctx->top_of_system; #endif }
Exec Code
0
get_minst_from_memory(const gs_memory_t *mem) { #ifdef PSI_INCLUDED extern gs_main_instance *ps_impl_get_minst( const gs_memory_t *mem ); return ps_impl_get_minst(mem); #else return (gs_main_instance*)mem->gs_lib_ctx->top_of_system; #endif }
@@ -57,6 +57,7 @@ #include "ivmspace.h" #include "idisp.h" /* for setting display device callback */ #include "iplugin.h" +#include "zfile.h" #ifdef PACIFY_VALGRIND #include "valgrind.h" @@ -212,6 +213,7 @@ gs_main_init1(gs_main_instance * minst) "the_gs_n...
CWE-20
null
null
11,241
gs_main_alloc_instance(gs_memory_t *mem) { gs_main_instance *minst; if (mem == NULL) return NULL; minst = (gs_main_instance *)gs_alloc_bytes_immovable(mem, sizeof(gs_main_instance), "in...
Exec Code
0
gs_main_alloc_instance(gs_memory_t *mem) { gs_main_instance *minst; if (mem == NULL) return NULL; minst = (gs_main_instance *)gs_alloc_bytes_immovable(mem, sizeof(gs_main_instance), "in...
@@ -57,6 +57,7 @@ #include "ivmspace.h" #include "idisp.h" /* for setting display device callback */ #include "iplugin.h" +#include "zfile.h" #ifdef PACIFY_VALGRIND #include "valgrind.h" @@ -212,6 +213,7 @@ gs_main_init1(gs_main_instance * minst) "the_gs_n...
CWE-20
null
null
11,242
gs_main_init0(gs_main_instance * minst, FILE * in, FILE * out, FILE * err, int max_lib_paths) { ref *paths; ref *array; /* Do platform-dependent initialization. */ /* We have to do this as the very first thing, */ /* because it detects attempts to run 80N86 executables (N>0) */ /*...
Exec Code
0
gs_main_init0(gs_main_instance * minst, FILE * in, FILE * out, FILE * err, int max_lib_paths) { ref *paths; ref *array; /* Do platform-dependent initialization. */ /* We have to do this as the very first thing, */ /* because it detects attempts to run 80N86 executables (N>0) */ /*...
@@ -57,6 +57,7 @@ #include "ivmspace.h" #include "idisp.h" /* for setting display device callback */ #include "iplugin.h" +#include "zfile.h" #ifdef PACIFY_VALGRIND #include "valgrind.h" @@ -212,6 +213,7 @@ gs_main_init1(gs_main_instance * minst) "the_gs_n...
CWE-20
null
null
11,243
gs_main_init2(gs_main_instance * minst) { i_ctx_t *i_ctx_p; int code = gs_main_init1(minst); int initial_init_level = minst->init_done; if (code < 0) return code; i_ctx_p = minst->i_ctx_p; code = gs_main_init2aux(minst); if (code < 0) return code; i_ctx_p = minst->i_ctx_p...
Exec Code
0
gs_main_init2(gs_main_instance * minst) { i_ctx_t *i_ctx_p; int code = gs_main_init1(minst); int initial_init_level = minst->init_done; if (code < 0) return code; i_ctx_p = minst->i_ctx_p; code = gs_main_init2aux(minst); if (code < 0) return code; i_ctx_p = minst->i_ctx_p...
@@ -57,6 +57,7 @@ #include "ivmspace.h" #include "idisp.h" /* for setting display device callback */ #include "iplugin.h" +#include "zfile.h" #ifdef PACIFY_VALGRIND #include "valgrind.h" @@ -212,6 +213,7 @@ gs_main_init1(gs_main_instance * minst) "the_gs_n...
CWE-20
null
null
11,244
int gs_main_init2aux(gs_main_instance * minst) { i_ctx_t * i_ctx_p = minst->i_ctx_p; if (minst->init_done < 2) { int code, exit_code; ref error_object, ifa; /* Set up enough so that we can safely be garbage collected */ i_ctx_p->op_array_table_global = empty_table; i_ct...
Exec Code
0
int gs_main_init2aux(gs_main_instance * minst) { i_ctx_t * i_ctx_p = minst->i_ctx_p; if (minst->init_done < 2) { int code, exit_code; ref error_object, ifa; /* Set up enough so that we can safely be garbage collected */ i_ctx_p->op_array_table_global = empty_table; i_ct...
@@ -57,6 +57,7 @@ #include "ivmspace.h" #include "idisp.h" /* for setting display device callback */ #include "iplugin.h" +#include "zfile.h" #ifdef PACIFY_VALGRIND #include "valgrind.h" @@ -212,6 +213,7 @@ gs_main_init1(gs_main_instance * minst) "the_gs_n...
CWE-20
null
null
11,245
check_file_permissions(i_ctx_t *i_ctx_p, const char *fname, int len, const char *permitgroup) { char fname_reduced[gp_file_name_sizeof]; uint rlen = sizeof(fname_reduced); if (gp_file_name_reduce(fname, len, fname_reduced, &rlen) != gp_combine_success) return gs_error_invali...
Exec Code
0
check_file_permissions(i_ctx_t *i_ctx_p, const char *fname, int len, const char *permitgroup) { char fname_reduced[gp_file_name_sizeof]; uint rlen = sizeof(fname_reduced); if (gp_file_name_reduce(fname, len, fname_reduced, &rlen) != gp_combine_success) return gs_error_invali...
@@ -197,6 +197,25 @@ check_file_permissions(i_ctx_t *i_ctx_p, const char *fname, int len, return check_file_permissions_reduced(i_ctx_p, fname_reduced, rlen, permitgroup); } +/* z_check_file_permissions: see zfile.h for explanation + */ +int +z_check_file_permissions(gs_memory_t *mem, const char *fname, const i...
CWE-20
null
null
11,246
PanoramiXRenderChangePicture (ClientPtr client) { PanoramiXRes *pict; int result = Success, j; REQUEST(xRenderChangePictureReq); REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { ...
DoS
0
PanoramiXRenderChangePicture (ClientPtr client) { PanoramiXRes *pict; int result = Success, j; REQUEST(xRenderChangePictureReq); REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,247
PanoramiXRenderComposite (ClientPtr client) { PanoramiXRes *src, *msk, *dst; int result = Success, j; xRenderCompositeReq orig; REQUEST(xRenderCompositeReq); REQUEST_SIZE_MATCH(xRenderCompositeReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); VERIFY_XIN_ALPHA (msk, s...
DoS
0
PanoramiXRenderComposite (ClientPtr client) { PanoramiXRes *src, *msk, *dst; int result = Success, j; xRenderCompositeReq orig; REQUEST(xRenderCompositeReq); REQUEST_SIZE_MATCH(xRenderCompositeReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); VERIFY_XIN_ALPHA (msk, s...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,248
PanoramiXRenderCompositeGlyphs (ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderCompositeGlyphsReq); xGlyphElt origElt, *elt; INT16 xSrc, ySrc; REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq); VERIFY_XIN_PICTURE (src, stuff->src, client,...
DoS
0
PanoramiXRenderCompositeGlyphs (ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderCompositeGlyphsReq); xGlyphElt origElt, *elt; INT16 xSrc, ySrc; REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq); VERIFY_XIN_PICTURE (src, stuff->src, client,...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,249
PanoramiXRenderCreateConicalGradient (ClientPtr client) { REQUEST(xRenderCreateConicalGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq); if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; ...
DoS
0
PanoramiXRenderCreateConicalGradient (ClientPtr client) { REQUEST(xRenderCreateConicalGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq); if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,250
PanoramiXRenderCreateLinearGradient (ClientPtr client) { REQUEST(xRenderCreateLinearGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq); if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; new...
DoS
0
PanoramiXRenderCreateLinearGradient (ClientPtr client) { REQUEST(xRenderCreateLinearGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq); if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; new...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,251
PanoramiXRenderCreatePicture (ClientPtr client) { REQUEST(xRenderCreatePictureReq); PanoramiXRes *refDraw, *newPict; int result, j; REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); result = dixLookupResourceByClass((pointer *)&refDraw, stuff->drawable, XRC_DRAWABLE, client, DixWrit...
DoS
0
PanoramiXRenderCreatePicture (ClientPtr client) { REQUEST(xRenderCreatePictureReq); PanoramiXRes *refDraw, *newPict; int result, j; REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); result = dixLookupResourceByClass((pointer *)&refDraw, stuff->drawable, XRC_DRAWABLE, client, DixWrit...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,252
PanoramiXRenderCreateRadialGradient (ClientPtr client) { REQUEST(xRenderCreateRadialGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; new...
DoS
0
PanoramiXRenderCreateRadialGradient (ClientPtr client) { REQUEST(xRenderCreateRadialGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; new...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,253
PanoramiXRenderCreateSolidFill (ClientPtr client) { REQUEST(xRenderCreateSolidFillReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XR...
DoS
0
PanoramiXRenderCreateSolidFill (ClientPtr client) { REQUEST(xRenderCreateSolidFillReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XR...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,254
PanoramiXRenderFillRectangles (ClientPtr client) { PanoramiXRes *dst; int result = Success, j; REQUEST(xRenderFillRectanglesReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq); VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); ...
DoS
0
PanoramiXRenderFillRectangles (ClientPtr client) { PanoramiXRes *dst; int result = Success, j; REQUEST(xRenderFillRectanglesReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq); VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,255
PanoramiXRenderFreePicture (ClientPtr client) { PanoramiXRes *pict; int result = Success, j; REQUEST(xRenderFreePictureReq); REQUEST_SIZE_MATCH(xRenderFreePictureReq); client->errorValue = stuff->picture; VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess); FO...
DoS
0
PanoramiXRenderFreePicture (ClientPtr client) { PanoramiXRes *pict; int result = Success, j; REQUEST(xRenderFreePictureReq); REQUEST_SIZE_MATCH(xRenderFreePictureReq); client->errorValue = stuff->picture; VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess); FO...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,256
PanoramiXRenderInit (void) { int i; XRT_PICTURE = CreateNewResourceType (XineramaDeleteResource, "XineramaPicture"); if (RenderErrBase) SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture); for (i = 0; i < RenderNumberRequests; i++) PanoramiXSaveRenderVector[i] = ProcRende...
DoS
0
PanoramiXRenderInit (void) { int i; XRT_PICTURE = CreateNewResourceType (XineramaDeleteResource, "XineramaPicture"); if (RenderErrBase) SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture); for (i = 0; i < RenderNumberRequests; i++) PanoramiXSaveRenderVector[i] = ProcRende...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,257
PanoramiXRenderSetPictureClipRectangles (ClientPtr client) { REQUEST(xRenderSetPictureClipRectanglesReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); F...
DoS
0
PanoramiXRenderSetPictureClipRectangles (ClientPtr client) { REQUEST(xRenderSetPictureClipRectanglesReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); F...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,258
PanoramiXRenderSetPictureFilter (ClientPtr client) { REQUEST(xRenderSetPictureFilterReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) ...
DoS
0
PanoramiXRenderSetPictureFilter (ClientPtr client) { REQUEST(xRenderSetPictureFilterReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,259
PanoramiXRenderSetPictureTransform (ClientPtr client) { REQUEST(xRenderSetPictureTransformReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BAC...
DoS
0
PanoramiXRenderSetPictureTransform (ClientPtr client) { REQUEST(xRenderSetPictureTransformReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BAC...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,260
PanoramiXRenderTrapezoids(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTrapezoidsReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderTrapezoidsReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAcc...
DoS
0
PanoramiXRenderTrapezoids(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTrapezoidsReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderTrapezoidsReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAcc...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,261
PanoramiXRenderTriFan(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTriFanReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderTriFanReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); VE...
DoS
0
PanoramiXRenderTriFan(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTriFanReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderTriFanReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); VE...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,262
PanoramiXRenderTriStrip(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTriStripReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderTriStripReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); ...
DoS
0
PanoramiXRenderTriStrip(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTriStripReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderTriStripReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,263
PanoramiXRenderTriangles(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTrianglesReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderTrianglesReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess...
DoS
0
PanoramiXRenderTriangles(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTrianglesReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE (xRenderTrianglesReq); VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,264
PictOpValid (CARD8 op) { if (/*PictOpMinimum <= op && */ op <= PictOpMaximum) return TRUE; if (PictOpDisjointMinimum <= op && op <= PictOpDisjointMaximum) return TRUE; if (PictOpConjointMinimum <= op && op <= PictOpConjointMaximum) return TRUE; if (PictOpBlendMinimum <= op && op <= PictOpBlendMaximum...
DoS
0
PictOpValid (CARD8 op) { if (/*PictOpMinimum <= op && */ op <= PictOpMaximum) return TRUE; if (PictOpDisjointMinimum <= op && op <= PictOpDisjointMaximum) return TRUE; if (PictOpConjointMinimum <= op && op <= PictOpConjointMaximum) return TRUE; if (PictOpBlendMinimum <= op && op <= PictOpBlendMaximum...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,265
ProcRenderAddGlyphsFromPicture (ClientPtr client) { return BadImplementation; }
DoS
0
ProcRenderAddGlyphsFromPicture (ClientPtr client) { return BadImplementation; }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,266
ProcRenderAddTraps (ClientPtr client) { int ntraps; PicturePtr pPicture; REQUEST(xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq); VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess); if (!pPicture->pDrawable) return BadDrawable; ntraps = (client->req_le...
DoS
0
ProcRenderAddTraps (ClientPtr client) { int ntraps; PicturePtr pPicture; REQUEST(xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq); VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess); if (!pPicture->pDrawable) return BadDrawable; ntraps = (client->req_le...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,267
ProcRenderChangePicture (ClientPtr client) { PicturePtr pPicture; REQUEST(xRenderChangePictureReq); int len; REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess); len = client->req_len - bytes_to_int32(sizeof(xRenderChangePictu...
DoS
0
ProcRenderChangePicture (ClientPtr client) { PicturePtr pPicture; REQUEST(xRenderChangePictureReq); int len; REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess); len = client->req_len - bytes_to_int32(sizeof(xRenderChangePictu...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,268
ProcRenderColorTrapezoids (ClientPtr client) { return BadImplementation; }
DoS
0
ProcRenderColorTrapezoids (ClientPtr client) { return BadImplementation; }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,269
ProcRenderColorTriangles (ClientPtr client) { return BadImplementation; }
DoS
0
ProcRenderColorTriangles (ClientPtr client) { return BadImplementation; }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,270
ProcRenderCompositeGlyphs (ClientPtr client) { GlyphSetPtr glyphSet; GlyphSet gs; PicturePtr pSrc, pDst; PictFormatPtr pFormat; GlyphListRec listsLocal[NLOCALDELTA]; GlyphListPtr lists, listsBase; GlyphPtr glyphsLocal[NLOCALGLYPH]; Glyph glyph; GlyphPtr ...
DoS
0
ProcRenderCompositeGlyphs (ClientPtr client) { GlyphSetPtr glyphSet; GlyphSet gs; PicturePtr pSrc, pDst; PictFormatPtr pFormat; GlyphListRec listsLocal[NLOCALDELTA]; GlyphListPtr lists, listsBase; GlyphPtr glyphsLocal[NLOCALGLYPH]; Glyph glyph; GlyphPtr ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,271
ProcRenderCreateAnimCursor (ClientPtr client) { REQUEST(xRenderCreateAnimCursorReq); CursorPtr *cursors; CARD32 *deltas; CursorPtr pCursor; int ncursor; xAnimCursorElt *elt; int i; int ret; REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq); LEGAL_NEW_...
DoS
0
ProcRenderCreateAnimCursor (ClientPtr client) { REQUEST(xRenderCreateAnimCursorReq); CursorPtr *cursors; CARD32 *deltas; CursorPtr pCursor; int ncursor; xAnimCursorElt *elt; int i; int ret; REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq); LEGAL_NEW_...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,272
ProcRenderCreateCursor (ClientPtr client) { REQUEST(xRenderCreateCursorReq); PicturePtr pSrc; ScreenPtr pScreen; unsigned short width, height; CARD32 *argbbits, *argb; unsigned char *srcbits, *srcline; unsigned char *mskbits, *mskline; int stride; int x, y;...
DoS
0
ProcRenderCreateCursor (ClientPtr client) { REQUEST(xRenderCreateCursorReq); PicturePtr pSrc; ScreenPtr pScreen; unsigned short width, height; CARD32 *argbbits, *argb; unsigned char *srcbits, *srcline; unsigned char *mskbits, *mskline; int stride; int x, y;...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,273
ProcRenderCreateGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; PictFormatPtr format; int rc, f; REQUEST(xRenderCreateGlyphSetReq); REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq); LEGAL_NEW_RESOURCE(stuff->gsid, client); rc = dixLookupResourceByType((pointer *)&format, stuff->...
DoS
0
ProcRenderCreateGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; PictFormatPtr format; int rc, f; REQUEST(xRenderCreateGlyphSetReq); REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq); LEGAL_NEW_RESOURCE(stuff->gsid, client); rc = dixLookupResourceByType((pointer *)&format, stuff->...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,274
ProcRenderCreatePicture (ClientPtr client) { PicturePtr pPicture; DrawablePtr pDrawable; PictFormatPtr pFormat; int len, error, rc; REQUEST(xRenderCreatePictureReq); REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDra...
DoS
0
ProcRenderCreatePicture (ClientPtr client) { PicturePtr pPicture; DrawablePtr pDrawable; PictFormatPtr pFormat; int len, error, rc; REQUEST(xRenderCreatePictureReq); REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDra...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,275
static int ProcRenderCreateRadialGradient (ClientPtr client) { PicturePtr pPicture; int len; int error = 0; xFixed *stops; xRenderColor *colors; REQUEST(xRenderCreateRadialGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); LEGAL_NEW_RESOURCE(s...
DoS
0
static int ProcRenderCreateRadialGradient (ClientPtr client) { PicturePtr pPicture; int len; int error = 0; xFixed *stops; xRenderColor *colors; REQUEST(xRenderCreateRadialGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); LEGAL_NEW_RESOURCE(s...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,276
static int ProcRenderCreateSolidFill(ClientPtr client) { PicturePtr pPicture; int error = 0; REQUEST(xRenderCreateSolidFillReq); REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); LEGAL_NEW_RESOURCE(stuff->pid, client); pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error);...
DoS
0
static int ProcRenderCreateSolidFill(ClientPtr client) { PicturePtr pPicture; int error = 0; REQUEST(xRenderCreateSolidFillReq); REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); LEGAL_NEW_RESOURCE(stuff->pid, client); pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error);...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,277
ProcRenderDispatch (ClientPtr client) { REQUEST(xReq); if (stuff->data < RenderNumberRequests) return (*ProcRenderVector[stuff->data]) (client); else return BadRequest; }
DoS
0
ProcRenderDispatch (ClientPtr client) { REQUEST(xReq); if (stuff->data < RenderNumberRequests) return (*ProcRenderVector[stuff->data]) (client); else return BadRequest; }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,278
ProcRenderFillRectangles (ClientPtr client) { PicturePtr pDst; int things; REQUEST(xRenderFillRectanglesReq); REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq); if (!PictOpValid (stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE (pDst, ...
DoS
0
ProcRenderFillRectangles (ClientPtr client) { PicturePtr pDst; int things; REQUEST(xRenderFillRectanglesReq); REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq); if (!PictOpValid (stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE (pDst, ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,279
ProcRenderFreeGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; int rc; REQUEST(xRenderFreeGlyphSetReq); REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq); rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType, client, DixDestroyAccess); if (rc != Success) { ...
DoS
0
ProcRenderFreeGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; int rc; REQUEST(xRenderFreeGlyphSetReq); REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq); rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType, client, DixDestroyAccess); if (rc != Success) { ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,280
ProcRenderFreeGlyphs (ClientPtr client) { REQUEST(xRenderFreeGlyphsReq); GlyphSetPtr glyphSet; int rc, nglyph; CARD32 *gids; CARD32 glyph; REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq); rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType, cl...
DoS
0
ProcRenderFreeGlyphs (ClientPtr client) { REQUEST(xRenderFreeGlyphsReq); GlyphSetPtr glyphSet; int rc, nglyph; CARD32 *gids; CARD32 glyph; REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq); rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType, cl...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,281
ProcRenderQueryDithers (ClientPtr client) { return BadImplementation; }
DoS
0
ProcRenderQueryDithers (ClientPtr client) { return BadImplementation; }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,282
ProcRenderQueryFilters (ClientPtr client) { REQUEST (xRenderQueryFiltersReq); DrawablePtr pDrawable; xRenderQueryFiltersReply *reply; int nbytesName; int nnames; ScreenPtr pScreen; PictureScreenPtr ps; int i, j, len, total_bytes, rc; INT16 *aliases; char *names;...
DoS
0
ProcRenderQueryFilters (ClientPtr client) { REQUEST (xRenderQueryFiltersReq); DrawablePtr pDrawable; xRenderQueryFiltersReply *reply; int nbytesName; int nnames; ScreenPtr pScreen; PictureScreenPtr ps; int i, j, len, total_bytes, rc; INT16 *aliases; char *names;...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,283
ProcRenderQueryPictFormats (ClientPtr client) { RenderClientPtr pRenderClient = GetRenderClient (client); xRenderQueryPictFormatsReply *reply; xPictScreen *pictScreen; xPictDepth *pictDepth; xPictVisual *pictVisual; xPictFormInfo *pictForm; CARD32 *pictSu...
DoS
0
ProcRenderQueryPictFormats (ClientPtr client) { RenderClientPtr pRenderClient = GetRenderClient (client); xRenderQueryPictFormatsReply *reply; xPictScreen *pictScreen; xPictDepth *pictDepth; xPictVisual *pictVisual; xPictFormInfo *pictForm; CARD32 *pictSu...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,284
ProcRenderQueryPictIndexValues (ClientPtr client) { PictFormatPtr pFormat; int rc, num; int rlength; int i, n; REQUEST(xRenderQueryPictIndexValuesReq); xRenderQueryPictIndexValuesReply *reply; xIndexValue *values; REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq...
DoS
0
ProcRenderQueryPictIndexValues (ClientPtr client) { PictFormatPtr pFormat; int rc, num; int rlength; int i, n; REQUEST(xRenderQueryPictIndexValuesReq); xRenderQueryPictIndexValuesReply *reply; xIndexValue *values; REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,285
ProcRenderQueryVersion (ClientPtr client) { RenderClientPtr pRenderClient = GetRenderClient (client); xRenderQueryVersionReply rep; register int n; REQUEST(xRenderQueryVersionReq); pRenderClient->major_version = stuff->majorVersion; pRenderClient->minor_version = stuff->minorVersion; REQUE...
DoS
0
ProcRenderQueryVersion (ClientPtr client) { RenderClientPtr pRenderClient = GetRenderClient (client); xRenderQueryVersionReply rep; register int n; REQUEST(xRenderQueryVersionReq); pRenderClient->major_version = stuff->majorVersion; pRenderClient->minor_version = stuff->minorVersion; REQUE...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,286
ProcRenderReferenceGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; int rc; REQUEST(xRenderReferenceGlyphSetReq); REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq); LEGAL_NEW_RESOURCE(stuff->gsid, client); rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->existing, GlyphSetType, ...
DoS
0
ProcRenderReferenceGlyphSet (ClientPtr client) { GlyphSetPtr glyphSet; int rc; REQUEST(xRenderReferenceGlyphSetReq); REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq); LEGAL_NEW_RESOURCE(stuff->gsid, client); rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->existing, GlyphSetType, ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,287
ProcRenderScale (ClientPtr client) { return BadImplementation; }
DoS
0
ProcRenderScale (ClientPtr client) { return BadImplementation; }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,288
ProcRenderSetPictureTransform (ClientPtr client) { REQUEST(xRenderSetPictureTransformReq); PicturePtr pPicture; REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess); return SetPictureTransform (pPicture, (PictTransform *) &stuff->tra...
DoS
0
ProcRenderSetPictureTransform (ClientPtr client) { REQUEST(xRenderSetPictureTransformReq); PicturePtr pPicture; REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess); return SetPictureTransform (pPicture, (PictTransform *) &stuff->tra...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,289
ProcRenderTransform (ClientPtr client) { return BadImplementation; }
DoS
0
ProcRenderTransform (ClientPtr client) { return BadImplementation; }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,290
ProcRenderTrapezoids (ClientPtr client) { int rc, ntraps; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrapezoidsReq); REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq); if (!PictOpValid (stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE ...
DoS
0
ProcRenderTrapezoids (ClientPtr client) { int rc, ntraps; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrapezoidsReq); REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq); if (!PictOpValid (stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,291
ProcRenderTriFan (ClientPtr client) { int rc, npoints; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); if (!PictOpValid (stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE (pSrc...
DoS
0
ProcRenderTriFan (ClientPtr client) { int rc, npoints; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); if (!PictOpValid (stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE (pSrc...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,292
ProcRenderTriStrip (ClientPtr client) { int rc, npoints; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); if (!PictOpValid (stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE (pS...
DoS
0
ProcRenderTriStrip (ClientPtr client) { int rc, npoints; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); if (!PictOpValid (stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE (pS...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,293
RenderClientCallback (CallbackListPtr *list, pointer closure, pointer data) { NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; ClientPtr pClient = clientinfo->client; RenderClientPtr pRenderClient = GetRenderClient (pClient); pRenderClient->major_version = 0; pRenderClie...
DoS
0
RenderClientCallback (CallbackListPtr *list, pointer closure, pointer data) { NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; ClientPtr pClient = clientinfo->client; RenderClientPtr pRenderClient = GetRenderClient (pClient); pRenderClient->major_version = 0; pRenderClie...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,294
RenderExtensionInit (void) { ExtensionEntry *extEntry; if (!PictureType) return; if (!PictureFinishInit ()) return; if (!dixRegisterPrivateKey(&RenderClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(RenderClientRec))) return; if (!AddCallback (&ClientStateCallback, RenderClientCallback, 0)) return; ...
DoS
0
RenderExtensionInit (void) { ExtensionEntry *extEntry; if (!PictureType) return; if (!PictureFinishInit ()) return; if (!dixRegisterPrivateKey(&RenderClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(RenderClientRec))) return; if (!AddCallback (&ClientStateCallback, RenderClientCallback, 0)) return; ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,295
RenderSetBit (unsigned char *line, int x, int bit) { unsigned char mask; if (screenInfo.bitmapBitOrder == LSBFirst) mask = (1 << (x & 7)); else mask = (0x80 >> (x & 7)); /* XXX assumes byte order is host byte order */ line += (x >> 3); if (bit) *line |= mask; else *line &= ~mask; ...
DoS
0
RenderSetBit (unsigned char *line, int x, int bit) { unsigned char mask; if (screenInfo.bitmapBitOrder == LSBFirst) mask = (1 << (x & 7)); else mask = (0x80 >> (x & 7)); /* XXX assumes byte order is host byte order */ line += (x >> 3); if (bit) *line |= mask; else *line &= ~mask; ...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,296
SProcRenderAddGlyphs (ClientPtr client) { register int n; register int i; CARD32 *gids; void *end; xGlyphInfo *gi; REQUEST(xRenderAddGlyphsReq); swaps(&stuff->length, n); swapl(&stuff->glyphset, n); swapl(&stuff->nglyphs, n); if (stuff->nglyphs & 0xe0000000) return BadLength...
DoS
0
SProcRenderAddGlyphs (ClientPtr client) { register int n; register int i; CARD32 *gids; void *end; xGlyphInfo *gi; REQUEST(xRenderAddGlyphsReq); swaps(&stuff->length, n); swapl(&stuff->glyphset, n); swapl(&stuff->nglyphs, n); if (stuff->nglyphs & 0xe0000000) return BadLength...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,297
SProcRenderAddGlyphsFromPicture (ClientPtr client) { return BadImplementation; }
DoS
0
SProcRenderAddGlyphsFromPicture (ClientPtr client) { return BadImplementation; }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,298
SProcRenderAddTraps (ClientPtr client) { register int n; REQUEST (xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq); swaps(&stuff->length, n); swapl(&stuff->picture, n); swaps(&stuff->xOff, n); swaps(&stuff->yOff, n); SwapRestL(stuff); return (*ProcRenderVector[stuff->...
DoS
0
SProcRenderAddTraps (ClientPtr client) { register int n; REQUEST (xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq); swaps(&stuff->length, n); swapl(&stuff->picture, n); swaps(&stuff->xOff, n); swaps(&stuff->yOff, n); SwapRestL(stuff); return (*ProcRenderVector[stuff->...
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null
11,299
SProcRenderChangePicture (ClientPtr client) { register int n; REQUEST(xRenderChangePictureReq); swaps(&stuff->length, n); swapl(&stuff->picture, n); swapl(&stuff->mask, n); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); }
DoS
0
SProcRenderChangePicture (ClientPtr client) { register int n; REQUEST(xRenderChangePictureReq); swaps(&stuff->length, n); swapl(&stuff->picture, n); swapl(&stuff->mask, n); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); }
@@ -1077,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + ...
CWE-20
null
null