idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
2,500
static int septransform(i_ctx_t *i_ctx_p, ref *sepspace, int *usealternate, int *stage, int *stack_depth) { gx_device * dev = igs->device; ref sname, proc; int code, colorant_number; code = array_get(imemory, sepspace, 1, &sname); if (code < 0) return code; if (r_has_type(&sname, t_name...
null
0
static int septransform(i_ctx_t *i_ctx_p, ref *sepspace, int *usealternate, int *stage, int *stack_depth) { gx_device * dev = igs->device; ref sname, proc; int code, colorant_number; code = array_get(imemory, sepspace, 1, &sname); if (code < 0) return code; if (r_has_type(&sname, t_name...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,501
static int sepvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps) { os_ptr op = osp; if (num_comps < 1) return_error(gs_error_stackunderflow); if (!r_has_type(op, t_integer) && !r_has_type(op, t_real)) return_error(gs_error_typecheck); if (*values > 1.0) *valu...
null
0
static int sepvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps) { os_ptr op = osp; if (num_comps < 1) return_error(gs_error_stackunderflow); if (!r_has_type(op, t_integer) && !r_has_type(op, t_real)) return_error(gs_error_typecheck); if (*values > 1.0) *valu...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,502
static int setcalgrayspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { ref graydict; int code = 0; float gamma, white[3], black[3]; double dflt_gamma = 1.0; static const float dflt_black[3] = {0,0,0}, dflt_white[3] = {0,0,0}; gs_clien...
null
0
static int setcalgrayspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { ref graydict; int code = 0; float gamma, white[3], black[3]; double dflt_gamma = 1.0; static const float dflt_black[3] = {0,0,0}, dflt_white[3] = {0,0,0}; gs_clien...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,503
static int setcalrgbspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { ref rgbdict; int code = 0; float gamma[3], white[3], black[3], matrix[9]; static const float dflt_gamma[3] = { 1.0, 1.0, 1.0 }; static const float dflt_black[3] = {0,0,0}, dflt_whi...
null
0
static int setcalrgbspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { ref rgbdict; int code = 0; float gamma[3], white[3], black[3], matrix[9]; static const float dflt_gamma[3] = { 1.0, 1.0, 1.0 }; static const float dflt_black[3] = {0,0,0}, dflt_whi...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,504
static int setcieaspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { int code = 0; ref CIEDict, *nocie; ulong dictkey; gs_md5_state_t md5; byte key[16]; if (i_ctx_p->language_level < 2) return_error(gs_error_undefined); code = dict_find_string(systemdict, "NOCI...
null
0
static int setcieaspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { int code = 0; ref CIEDict, *nocie; ulong dictkey; gs_md5_state_t md5; byte key[16]; if (i_ctx_p->language_level < 2) return_error(gs_error_undefined); code = dict_find_string(systemdict, "NOCI...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,505
static int setciedefgspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { int code = 0; ref CIEDict, *nocie; ulong dictkey; gs_md5_state_t md5; byte key[16]; if (i_ctx_p->language_level < 3) return_error(gs_error_undefined); code = dict_find_string(systemdict, "N...
null
0
static int setciedefgspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { int code = 0; ref CIEDict, *nocie; ulong dictkey; gs_md5_state_t md5; byte key[16]; if (i_ctx_p->language_level < 3) return_error(gs_error_undefined); code = dict_find_string(systemdict, "N...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,506
static int setciedefspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { int code = 0; ref CIEDict, *nocie; ulong dictkey; gs_md5_state_t md5; byte key[16]; if (i_ctx_p->language_level < 3) return_error(gs_error_undefined); code = dict_find_string(systemdict, "NO...
null
0
static int setciedefspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { int code = 0; ref CIEDict, *nocie; ulong dictkey; gs_md5_state_t md5; byte key[16]; if (i_ctx_p->language_level < 3) return_error(gs_error_undefined); code = dict_find_string(systemdict, "NO...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,507
setcolor_cont(i_ctx_t *i_ctx_p) { ref arr, *parr = &arr; es_ptr ep = esp; int i=0, code = 0, usealternate, stage, stack_depth, CIESubst = 0, IsICC = 0; unsigned int depth; PS_colour_space_t *obj; stack_depth = (int)ep[-3].value.intval; depth = (unsigned int)ep[-2].value.intval; stage = ...
null
0
setcolor_cont(i_ctx_t *i_ctx_p) { ref arr, *parr = &arr; es_ptr ep = esp; int i=0, code = 0, usealternate, stage, stack_depth, CIESubst = 0, IsICC = 0; unsigned int depth; PS_colour_space_t *obj; stack_depth = (int)ep[-3].value.intval; depth = (unsigned int)ep[-2].value.intval; stage = ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,508
setcolorspace_cont(i_ctx_t *i_ctx_p) { ref arr, *parr = &arr; os_ptr op = osp; es_ptr ep = esp, pdepth, pstage, pCIESubst; int i, code = 0, stage, cont, CIESubst = 0; unsigned int depth; PS_colour_space_t *obj; pCIESubst = &ep[-3]; pdepth = &ep[-2]; pstage = &ep[-1]; CIESubst =...
null
0
setcolorspace_cont(i_ctx_t *i_ctx_p) { ref arr, *parr = &arr; os_ptr op = osp; es_ptr ep = esp, pdepth, pstage, pCIESubst; int i, code = 0, stage, cont, CIESubst = 0; unsigned int depth; PS_colour_space_t *obj; pCIESubst = &ep[-3]; pdepth = &ep[-2]; pstage = &ep[-1]; CIESubst =...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,509
setcolorspace_nosubst(i_ctx_t * i_ctx_p) { os_ptr op = osp; es_ptr ep; int code, depth; /* Make sure we have an operand... */ check_op(1); /* Check its either a name (base space) or an array */ if (!r_has_type(op, t_name)) if (!r_is_array(op)) return_error(gs_error_type...
null
0
setcolorspace_nosubst(i_ctx_t * i_ctx_p) { os_ptr op = osp; es_ptr ep; int code, depth; /* Make sure we have an operand... */ check_op(1); /* Check its either a name (base space) or an array */ if (!r_has_type(op, t_name)) if (!r_is_array(op)) return_error(gs_error_type...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,510
static int setdevicenspace(i_ctx_t * i_ctx_p, ref *devicenspace, int *stage, int *cont, int CIESubst) { os_ptr op = osp; /* required by "push" macro */ int code = 0, num_components, i; ref namesarray, proc, sname, tname, sref; ref_colorspace cspace_old; gs_color_space *pcs; gs_color_space * p...
null
0
static int setdevicenspace(i_ctx_t * i_ctx_p, ref *devicenspace, int *stage, int *cont, int CIESubst) { os_ptr op = osp; /* required by "push" macro */ int code = 0, num_components, i; ref namesarray, proc, sname, tname, sref; ref_colorspace cspace_old; gs_color_space *pcs; gs_color_space * p...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,511
static int setgrayspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { os_ptr op = osp; gs_color_space *pcs; int code=0; ref stref; do { switch (*stage) { case 0: if (istate->use_cie_color.value.boolval && !CIESubst) { byte...
null
0
static int setgrayspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { os_ptr op = osp; gs_color_space *pcs; int code=0; ref stref; do { switch (*stage) { case 0: if (istate->use_cie_color.value.boolval && !CIESubst) { byte...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,512
static int seticcspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { os_ptr op = osp; ref ICCdict, *tempref, *altref=NULL, *nocie = NULL; int components, code; float range[8]; code = dict_find_string(systemdict, "NOCIE", &nocie); if (code > 0) { if (!r_has_type(n...
null
0
static int seticcspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { os_ptr op = osp; ref ICCdict, *tempref, *altref=NULL, *nocie = NULL; int components, code; float range[8]; code = dict_find_string(systemdict, "NOCIE", &nocie); if (code > 0) { if (!r_has_type(n...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,513
static int setindexedspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { ref *pproc = &istate->colorspace[0].procs.special.index_proc; int code = 0; uint edepth = ref_stack_count(&e_stack); ref_colorspace cspace_old; ref hival, lookup; gs_color_space *pcs; gs_color_space ...
null
0
static int setindexedspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { ref *pproc = &istate->colorspace[0].procs.special.index_proc; int code = 0; uint edepth = ref_stack_count(&e_stack); ref_colorspace cspace_old; ref hival, lookup; gs_color_space *pcs; gs_color_space ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,514
static int setlabspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { /* In this case, we will treat this as an ICC color space, with a CIELAB 16 bit profile */ ref labdict; int code = 0; float range_buff[4], white[3], black[3]; stat...
null
0
static int setlabspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { /* In this case, we will treat this as an ICC color space, with a CIELAB 16 bit profile */ ref labdict; int code = 0; float range_buff[4], white[3], black[3]; stat...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,515
static int setpatternspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { gs_color_space *pcs; gs_color_space *pcs_base; uint edepth = ref_stack_count(&e_stack); int code = 0; if (i_ctx_p->language_level < 2) return_error(gs_error_undefined); *cont = 0; pcs_base ...
null
0
static int setpatternspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { gs_color_space *pcs; gs_color_space *pcs_base; uint edepth = ref_stack_count(&e_stack); int code = 0; if (i_ctx_p->language_level < 2) return_error(gs_error_undefined); *cont = 0; pcs_base ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,516
static int setrgbspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { os_ptr op = osp; gs_color_space *pcs; int code=0; ref stref; do { switch (*stage) { case 0: if (istate->use_cie_color.value.boolval && !CIESubst) { byte ...
null
0
static int setrgbspace(i_ctx_t * i_ctx_p, ref *r, int *stage, int *cont, int CIESubst) { os_ptr op = osp; gs_color_space *pcs; int code=0; ref stref; do { switch (*stage) { case 0: if (istate->use_cie_color.value.boolval && !CIESubst) { byte ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,517
static int setseparationspace(i_ctx_t * i_ctx_p, ref *sepspace, int *stage, int *cont, int CIESubst) { os_ptr op = osp; /* required by "push" macro */ int code = 0; ref sname, proc; ref name_none, name_all; separation_type sep_type; ref_colorspace cspace_old; gs_color_space *pcs; gs_co...
null
0
static int setseparationspace(i_ctx_t * i_ctx_p, ref *sepspace, int *stage, int *cont, int CIESubst) { os_ptr op = osp; /* required by "push" macro */ int code = 0; ref sname, proc; ref name_none, name_all; separation_type sep_type; ref_colorspace cspace_old; gs_color_space *pcs; gs_co...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,518
setstrokecolor_cont(i_ctx_t * i_ctx_p) { return zswapcolors(i_ctx_p); }
null
0
setstrokecolor_cont(i_ctx_t * i_ctx_p) { return zswapcolors(i_ctx_p); }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,519
setstrokecolorspace_cont(i_ctx_t * i_ctx_p) { return zswapcolors(i_ctx_p); }
null
0
setstrokecolorspace_cont(i_ctx_t * i_ctx_p) { return zswapcolors(i_ctx_p); }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,520
static int threecomponent(i_ctx_t * i_ctx_p, ref *space, int *n) { *n = 3; return 0; }
null
0
static int threecomponent(i_ctx_t * i_ctx_p, ref *space, int *n) { *n = 3; return 0; }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,521
static int truecompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace) { return 1; }
null
0
static int truecompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace) { return 1; }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,522
static int validate_spaces(i_ctx_t *i_ctx_p, ref *arr, int *depth) { ref space, *sp = &space; int code = 0; PS_colour_space_t *obj; ref_assign(&space, arr); *depth = 0; do { code = get_space_object(i_ctx_p, sp, &obj); if (code < 0) return code; (*depth)++; ...
null
0
static int validate_spaces(i_ctx_t *i_ctx_p, ref *arr, int *depth) { ref space, *sp = &space; int code = 0; PS_colour_space_t *obj; ref_assign(&space, arr); *depth = 0; do { code = get_space_object(i_ctx_p, sp, &obj); if (code < 0) return code; (*depth)++; ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,523
static int validatecalgrayspace(i_ctx_t * i_ctx_p, ref **r) { int code=0; ref *space, calgraydict; space = *r; if (!r_is_array(space)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(space) < 2) return_error(gs_error_rangeche...
null
0
static int validatecalgrayspace(i_ctx_t * i_ctx_p, ref **r) { int code=0; ref *space, calgraydict; space = *r; if (!r_is_array(space)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(space) < 2) return_error(gs_error_rangeche...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,524
static int validatecieabcspace(i_ctx_t * i_ctx_p, ref **r) { int code = 0, i; float value[9]; ref CIEdict, *CIEspace = *r, *tempref, valref; if (!r_is_array(CIEspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(CIEspace) != ...
null
0
static int validatecieabcspace(i_ctx_t * i_ctx_p, ref **r) { int code = 0, i; float value[9]; ref CIEdict, *CIEspace = *r, *tempref, valref; if (!r_is_array(CIEspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(CIEspace) != ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,525
static int validatecieaspace(i_ctx_t * i_ctx_p, ref **r) { int code; float value[9]; ref CIEdict, *CIEspace = *r, *tempref; if (!r_is_array(CIEspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(CIEspace) != 2) return...
null
0
static int validatecieaspace(i_ctx_t * i_ctx_p, ref **r) { int code; float value[9]; ref CIEdict, *CIEspace = *r, *tempref; if (!r_is_array(CIEspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(CIEspace) != 2) return...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,526
static int validateciedefgspace(i_ctx_t * i_ctx_p, ref **r) { int code = 0, i, j; float value[8]; ref CIEdict, *CIEspace = *r, tempref, arrayref, valref, *pref = &tempref; if (!r_is_array(CIEspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands ...
null
0
static int validateciedefgspace(i_ctx_t * i_ctx_p, ref **r) { int code = 0, i, j; float value[8]; ref CIEdict, *CIEspace = *r, tempref, arrayref, valref, *pref = &tempref; if (!r_is_array(CIEspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,527
static int validateciedefspace(i_ctx_t * i_ctx_p, ref **r) { int code = 0, i; float value[6]; ref CIEdict, *pref, *CIEspace = *r, tempref, valref; if (!r_is_array(CIEspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(CIEspac...
null
0
static int validateciedefspace(i_ctx_t * i_ctx_p, ref **r) { int code = 0, i; float value[6]; ref CIEdict, *pref, *CIEspace = *r, tempref, valref; if (!r_is_array(CIEspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(CIEspac...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,528
static int validatedevicepspace(i_ctx_t * i_ctx_p, ref **space) { int code = 0; ref *r = *space, bpp; if (!r_is_array(r)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(r) != 2) return_error(gs_error_rangecheck); /* Make sur...
null
0
static int validatedevicepspace(i_ctx_t * i_ctx_p, ref **space) { int code = 0; ref *r = *space, bpp; if (!r_is_array(r)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(r) != 2) return_error(gs_error_rangecheck); /* Make sur...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,529
static int validateiccspace(i_ctx_t * i_ctx_p, ref **r) { int code=0, i, components = 0; ref *space, *tempref, valref, ICCdict, sref; space = *r; if (!r_is_array(space)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(space) != 2) ...
null
0
static int validateiccspace(i_ctx_t * i_ctx_p, ref **r) { int code=0, i, components = 0; ref *space, *tempref, valref, ICCdict, sref; space = *r; if (!r_is_array(space)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(space) != 2) ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,530
static int validateindexedspace(i_ctx_t * i_ctx_p, ref **space) { int code = 0; ref *r = *space; ref nameref, sref, hival, lookup, altspace; if (!r_is_array(r)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(r) != 4) return_...
null
0
static int validateindexedspace(i_ctx_t * i_ctx_p, ref **space) { int code = 0; ref *r = *space; ref nameref, sref, hival, lookup, altspace; if (!r_is_array(r)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(r) != 4) return_...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,531
static int validatelabspace(i_ctx_t * i_ctx_p, ref **r) { int code=0; ref *space, labdict; space = *r; if (!r_is_array(space)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(space) < 2) return_error(gs_error_rangecheck); ...
null
0
static int validatelabspace(i_ctx_t * i_ctx_p, ref **r) { int code=0; ref *space, labdict; space = *r; if (!r_is_array(space)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(space) < 2) return_error(gs_error_rangecheck); ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,532
static int validatepatternspace(i_ctx_t * i_ctx_p, ref **r) { int code; ref tref; /* since makepattern has already been run, we don't need to do much validation */ if (!r_has_type(*r, t_name)) { if (r_is_array(*r)) { if (r_size(*r) > 1) { code = array_get(imemory, *r...
null
0
static int validatepatternspace(i_ctx_t * i_ctx_p, ref **r) { int code; ref tref; /* since makepattern has already been run, we don't need to do much validation */ if (!r_has_type(*r, t_name)) { if (r_is_array(*r)) { if (r_size(*r) > 1) { code = array_get(imemory, *r...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,533
static int validateseparationspace(i_ctx_t * i_ctx_p, ref **space) { int code = 0; ref *sepspace = *space; ref nameref, sref, sname, altspace, tref; if (!r_is_array(sepspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(sepspace)...
null
0
static int validateseparationspace(i_ctx_t * i_ctx_p, ref **space) { int code = 0; ref *sepspace = *space; ref nameref, sref, sname, altspace, tref; if (!r_is_array(sepspace)) return_error(gs_error_typecheck); /* Validate parameters, check we have enough operands */ if (r_size(sepspace)...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,534
zcolor_remap_one( i_ctx_t * i_ctx_p, const ref * pproc, gx_transfer_map * pmap, const gs_gstate * pgs, op_proc_t finish_proc ) { os_ptr op; /* * Detect the identity function, which is a common value for one or * more of these functions...
null
0
zcolor_remap_one( i_ctx_t * i_ctx_p, const ref * pproc, gx_transfer_map * pmap, const gs_gstate * pgs, op_proc_t finish_proc ) { os_ptr op; /* * Detect the identity function, which is a common value for one or * more of these functions...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,535
zcolor_remap_one_finish(i_ctx_t *i_ctx_p) { return zcolor_remap_one_store(i_ctx_p, 0.0); }
null
0
zcolor_remap_one_finish(i_ctx_t *i_ctx_p) { return zcolor_remap_one_store(i_ctx_p, 0.0); }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,536
zcolor_remap_one_store(i_ctx_t *i_ctx_p, double min_value) { int i; gx_transfer_map *pmap = r_ptr(esp, gx_transfer_map); if (ref_stack_count(&o_stack) < transfer_map_size) return_error(gs_error_stackunderflow); for (i = 0; i < transfer_map_size; i++) { double v; int code = ...
null
0
zcolor_remap_one_store(i_ctx_t *i_ctx_p, double min_value) { int i; gx_transfer_map *pmap = r_ptr(esp, gx_transfer_map); if (ref_stack_count(&o_stack) < transfer_map_size) return_error(gs_error_stackunderflow); for (i = 0; i < transfer_map_size; i++) { double v; int code = ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,537
zincludecolorspace(i_ctx_t * i_ctx_p) { os_ptr op = osp; ref nsref; int code; check_type(*op, t_name); name_string_ref(imemory, op, &nsref); code = gs_includecolorspace(igs, nsref.value.const_bytes, r_size(&nsref)); if (!code) pop(1); return code; }
null
0
zincludecolorspace(i_ctx_t * i_ctx_p) { os_ptr op = osp; ref nsref; int code; check_type(*op, t_name); name_string_ref(imemory, op, &nsref); code = gs_includecolorspace(igs, nsref.value.const_bytes, r_size(&nsref)); if (!code) pop(1); return code; }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,538
zprocesscolors(i_ctx_t * i_ctx_p) { os_ptr op = osp; push(1); make_int(op, gs_currentdevice(igs)->color_info.num_components); return 0; }
null
0
zprocesscolors(i_ctx_t * i_ctx_p) { os_ptr op = osp; push(1); make_int(op, gs_currentdevice(igs)->color_info.num_components); return 0; }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,539
zsetcmykcolor(i_ctx_t * i_ctx_p) { os_ptr op = osp; /* required by "push" macro */ int code, i; float values[4]; /* Gather numeric operand value(s) (also checks type) */ code = float_params(op, 4, (float *)&values); if (code < 0) return code; /* Clamp numeric operand range(s) */ ...
null
0
zsetcmykcolor(i_ctx_t * i_ctx_p) { os_ptr op = osp; /* required by "push" macro */ int code, i; float values[4]; /* Gather numeric operand value(s) (also checks type) */ code = float_params(op, 4, (float *)&values); if (code < 0) return code; /* Clamp numeric operand range(s) */ ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,540
zsetcolorspace(i_ctx_t * i_ctx_p) { os_ptr op = osp; es_ptr ep; int code, depth; bool is_CIE; /* Make sure we have an operand... */ check_op(1); /* Check its either a name (base space) or an array */ if (!r_has_type(op, t_name)) if (!r_is_array(op)) return_error(gs_...
null
0
zsetcolorspace(i_ctx_t * i_ctx_p) { os_ptr op = osp; es_ptr ep; int code, depth; bool is_CIE; /* Make sure we have an operand... */ check_op(1); /* Check its either a name (base space) or an array */ if (!r_has_type(op, t_name)) if (!r_is_array(op)) return_error(gs_...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,541
zsetfillcolor(i_ctx_t * i_ctx_p) { return zsetcolor(i_ctx_p); }
null
0
zsetfillcolor(i_ctx_t * i_ctx_p) { return zsetcolor(i_ctx_p); }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,542
zsetfillcolorspace(i_ctx_t * i_ctx_p) { return zsetcolorspace(i_ctx_p); }
null
0
zsetfillcolorspace(i_ctx_t * i_ctx_p) { return zsetcolorspace(i_ctx_p); }
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,543
zsetgray(i_ctx_t * i_ctx_p) { os_ptr op = osp; /* required by "push" macro */ float value; int code; /* Gather numeric operand value(s) */ code = float_params(op, 1, &value); if (code < 0) return code; /* Clamp numeric operand range(s) */ if (value < 0) value = 0; ...
null
0
zsetgray(i_ctx_t * i_ctx_p) { os_ptr op = osp; /* required by "push" macro */ float value; int code; /* Gather numeric operand value(s) */ code = float_params(op, 1, &value); if (code < 0) return code; /* Clamp numeric operand range(s) */ if (value < 0) value = 0; ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,544
zsetrgbcolor(i_ctx_t * i_ctx_p) { os_ptr op = osp; /* required by "push" macro */ int code, i; float values[3]; /* Gather numeric operand value(s) (also checks type) */ code = float_params(op, 3, (float *)&values); if (code < 0) return code; /* Clamp numeric operand range(s) */ ...
null
0
zsetrgbcolor(i_ctx_t * i_ctx_p) { os_ptr op = osp; /* required by "push" macro */ int code, i; float values[3]; /* Gather numeric operand value(s) (also checks type) */ code = float_params(op, 3, (float *)&values); if (code < 0) return code; /* Clamp numeric operand range(s) */ ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,545
zswapcolors(i_ctx_t * i_ctx_p) { ref_colorspace tmp_cs; ref tmp_pat; tmp_cs = istate->colorspace[0]; istate->colorspace[0] = istate->colorspace[1]; istate->colorspace[1] = tmp_cs; tmp_pat = istate->pattern[0]; istate->pattern[0] = istate->pattern[1]; ...
null
0
zswapcolors(i_ctx_t * i_ctx_p) { ref_colorspace tmp_cs; ref tmp_pat; tmp_cs = istate->colorspace[0]; istate->colorspace[0] = istate->colorspace[1]; istate->colorspace[1] = tmp_cs; tmp_pat = istate->pattern[0]; istate->pattern[0] = istate->pattern[1]; ...
@@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p) if (r_has_type(op, t_dictionary)) { ref *pImpl, pPatInst; - code = dict_find_string(op, "Implementation", &pImpl); - if (code != 0) { + if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0) + ...
CWE-704
null
null
2,546
access_check(i_ctx_t *i_ctx_p, int access, /* mask for attrs */ bool modify) /* if true, reduce access */ { os_ptr op = osp; ref *aop; switch (r_type(op)) { case t_dictionary: aop = dict_access_ref(op); if (modify) { if ...
null
0
access_check(i_ctx_t *i_ctx_p, int access, /* mask for attrs */ bool modify) /* if true, reduce access */ { os_ptr op = osp; ref *aop; switch (r_type(op)) { case t_dictionary: aop = dict_access_ref(op); if (modify) { if ...
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,547
convert_to_string(const gs_memory_t *mem, os_ptr op1, os_ptr op) { uint len; const byte *pstr = 0; int code = obj_cvs(mem, op1, op->value.bytes, r_size(op), &len, &pstr); if (code < 0) { /* * Some common downloaded error handlers assume that * operator names don't exceed a cer...
null
0
convert_to_string(const gs_memory_t *mem, os_ptr op1, os_ptr op) { uint len; const byte *pstr = 0; int code = obj_cvs(mem, op1, op->value.bytes, r_size(op), &len, &pstr); if (code < 0) { /* * Some common downloaded error handlers assume that * operator names don't exceed a cer...
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,548
zcvlit(i_ctx_t *i_ctx_p) { os_ptr op = osp; ref *aop; check_op(1); aop = ACCESS_REF(op); r_clear_attrs(aop, a_executable); return 0; }
null
0
zcvlit(i_ctx_t *i_ctx_p) { os_ptr op = osp; ref *aop; check_op(1); aop = ACCESS_REF(op); r_clear_attrs(aop, a_executable); return 0; }
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,549
zcvn(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_read_type(*op, t_string); return name_from_string(imemory, op, op); }
null
0
zcvn(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_read_type(*op, t_string); return name_from_string(imemory, op, op); }
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,550
zcvr(i_ctx_t *i_ctx_p) { os_ptr op = osp; switch (r_type(op)) { case t_integer: make_real(op, (float)op->value.intval); case t_real: return 0; default: return_op_typecheck(op); case t_string: { ref str, token; ...
null
0
zcvr(i_ctx_t *i_ctx_p) { os_ptr op = osp; switch (r_type(op)) { case t_integer: make_real(op, (float)op->value.intval); case t_real: return 0; default: return_op_typecheck(op); case t_string: { ref str, token; ...
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,551
zcvrs(i_ctx_t *i_ctx_p) { os_ptr op = osp; int radix; check_type(op[-1], t_integer); if (op[-1].value.intval < 2 || op[-1].value.intval > 36) return_error(gs_error_rangecheck); radix = op[-1].value.intval; check_write_type(*op, t_string); if (radix == 10) { switch (r_type(op...
null
0
zcvrs(i_ctx_t *i_ctx_p) { os_ptr op = osp; int radix; check_type(op[-1], t_integer); if (op[-1].value.intval < 2 || op[-1].value.intval > 36) return_error(gs_error_rangecheck); radix = op[-1].value.intval; check_write_type(*op, t_string); if (radix == 10) { switch (r_type(op...
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,552
zcvs(i_ctx_t *i_ctx_p) { os_ptr op = osp; int code; check_write_type(*op, t_string); check_op(2); code = convert_to_string(imemory, op - 1, op); if (code >= 0) pop(1); return code; }
null
0
zcvs(i_ctx_t *i_ctx_p) { os_ptr op = osp; int code; check_write_type(*op, t_string); check_op(2); code = convert_to_string(imemory, op - 1, op); if (code >= 0) pop(1); return code; }
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,553
zexecuteonly(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_op(1); if (r_has_type(op, t_dictionary)) return_error(gs_error_typecheck); return access_check(i_ctx_p, a_execute, true); }
null
0
zexecuteonly(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_op(1); if (r_has_type(op, t_dictionary)) return_error(gs_error_typecheck); return access_check(i_ctx_p, a_execute, true); }
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,554
znoaccess(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_op(1); if (r_has_type(op, t_dictionary)) { ref *aop = dict_access_ref(op); /* CPSI throws invalidaccess when seting noaccess to a readonly dictionary (CET 13-13-6) : */ if (!r_has_attrs(aop, a_write)) { if (!r_has_att...
null
0
znoaccess(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_op(1); if (r_has_type(op, t_dictionary)) { ref *aop = dict_access_ref(op); /* CPSI throws invalidaccess when seting noaccess to a readonly dictionary (CET 13-13-6) : */ if (!r_has_attrs(aop, a_write)) { if (!r_has_att...
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,555
zrcheck(i_ctx_t *i_ctx_p) { os_ptr op = osp; int code = access_check(i_ctx_p, a_read, false); if (code >= 0) make_bool(op, code), code = 0; return code; }
null
0
zrcheck(i_ctx_t *i_ctx_p) { os_ptr op = osp; int code = access_check(i_ctx_p, a_read, false); if (code >= 0) make_bool(op, code), code = 0; return code; }
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,556
zreadonly(i_ctx_t *i_ctx_p) { return access_check(i_ctx_p, a_readonly, true); }
null
0
zreadonly(i_ctx_t *i_ctx_p) { return access_check(i_ctx_p, a_readonly, true); }
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,557
ztypenames(i_ctx_t *i_ctx_p) { os_ptr op = osp; static const char *const tnames[] = { REF_TYPE_NAME_STRINGS }; int i; check_ostack(t_next_index); for (i = 0; i < t_next_index; i++) { ref *const rtnp = op + 1 + i; if (i >= countof(tnames) || tnames[i] == 0) make_null(rtn...
null
0
ztypenames(i_ctx_t *i_ctx_p) { os_ptr op = osp; static const char *const tnames[] = { REF_TYPE_NAME_STRINGS }; int i; check_ostack(t_next_index); for (i = 0; i < t_next_index; i++) { ref *const rtnp = op + 1 + i; if (i >= countof(tnames) || tnames[i] == 0) make_null(rtn...
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,558
zwcheck(i_ctx_t *i_ctx_p) { os_ptr op = osp; int code = access_check(i_ctx_p, a_write, false); if (code >= 0) make_bool(op, code), code = 0; return code; }
null
0
zwcheck(i_ctx_t *i_ctx_p) { os_ptr op = osp; int code = access_check(i_ctx_p, a_write, false); if (code >= 0) make_bool(op, code), code = 0; return code; }
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,559
zxcheck(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_op(1); make_bool(op, (r_has_attr(ACCESS_REF(op), a_executable) ? 1 : 0)); return 0; }
null
0
zxcheck(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_op(1); make_bool(op, (r_has_attr(ACCESS_REF(op), a_executable) ? 1 : 0)); return 0; }
@@ -76,7 +76,7 @@ ztype(i_ctx_t *i_ctx_p) /* Must be either a stack underflow or a t_[a]struct. */ check_op(2); { /* Get the type name from the structure. */ - if (op[-1].value.pstruct != 0x00) { + if ((r_has_type(&op[-1], t_struct) || r_has_type(&o...
CWE-704
null
null
2,560
zsetcolor(i_ctx_t * i_ctx_p) { os_ptr op = osp; es_ptr ep; const gs_color_space * pcs = gs_currentcolorspace(igs); gs_client_color cc; int n_comps, n_numeric_comps, num_offset = 0, code, depth; PS_colour_space_t *space; /* initialize the client ...
Overflow
0
zsetcolor(i_ctx_t * i_ctx_p) { os_ptr op = osp; es_ptr ep; const gs_color_space * pcs = gs_currentcolorspace(igs); gs_client_color cc; int n_comps, n_numeric_comps, num_offset = 0, code, depth; PS_colour_space_t *space; /* initialize the client ...
@@ -6611,6 +6611,7 @@ static int zsetstrokecolor(i_ctx_t * i_ctx_p) { int code; + es_ptr iesp = esp; /* preserve exec stack in case of error */ code = zswapcolors(i_ctx_p); if (code < 0) @@ -6627,6 +6628,9 @@ zsetstrokecolor(i_ctx_t * i_ctx_p) if (code >= 0) return o_push_estack; ...
CWE-119
null
null
2,561
calc_rate (wgint bytes, double secs, int *units) { double dlrate; double bibyte = 1000.0; if (!opt.report_bps) bibyte = 1024.0; assert (secs >= 0); assert (bytes >= 0); if (secs == 0) /* If elapsed time is exactly zero, it means we're under the resolution of the timer. This can easily ha...
Overflow
0
calc_rate (wgint bytes, double secs, int *units) { double dlrate; double bibyte = 1000.0; if (!opt.report_bps) bibyte = 1024.0; assert (secs >= 0); assert (bytes >= 0); if (secs == 0) /* If elapsed time is exactly zero, it means we're under the resolution of the timer. This can easily ha...
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,562
fd_read_line (int fd) { return fd_read_hunk (fd, line_terminator, 128, FD_READ_LINE_MAX); }
Overflow
0
fd_read_line (int fd) { return fd_read_hunk (fd, line_terminator, 128, FD_READ_LINE_MAX); }
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,563
getproxy (struct url *u) { char *proxy = NULL; char *rewritten_url; if (!opt.use_proxy) return NULL; if (no_proxy_match (u->host, (const char **)opt.no_proxy)) return NULL; switch (u->scheme) { case SCHEME_HTTP: proxy = opt.http_proxy ? opt.http_proxy : getenv ("http_proxy"); bre...
Overflow
0
getproxy (struct url *u) { char *proxy = NULL; char *rewritten_url; if (!opt.use_proxy) return NULL; if (no_proxy_match (u->host, (const char **)opt.no_proxy)) return NULL; switch (u->scheme) { case SCHEME_HTTP: proxy = opt.http_proxy ? opt.http_proxy : getenv ("http_proxy"); bre...
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,564
input_file_url (const char *input_file) { static bool first = true; if (input_file && url_has_scheme (input_file) && first) { first = false; return true; } else return false; }
Overflow
0
input_file_url (const char *input_file) { static bool first = true; if (input_file && url_has_scheme (input_file) && first) { first = false; return true; } else return false; }
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,565
limit_bandwidth (wgint bytes, struct ptimer *timer) { double delta_t = ptimer_read (timer) - limit_data.chunk_start; double expected; limit_data.chunk_bytes += bytes; /* Calculate the amount of time we expect downloading the chunk should take. If in reality it took less time, sleep to compensate fo...
Overflow
0
limit_bandwidth (wgint bytes, struct ptimer *timer) { double delta_t = ptimer_read (timer) - limit_data.chunk_start; double expected; limit_data.chunk_bytes += bytes; /* Calculate the amount of time we expect downloading the chunk should take. If in reality it took less time, sleep to compensate fo...
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,566
limit_bandwidth_reset (void) { xzero (limit_data); }
Overflow
0
limit_bandwidth_reset (void) { xzero (limit_data); }
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,567
no_proxy_match (const char *host, const char **no_proxy) { if (!no_proxy) return false; else return sufmatch (no_proxy, host); }
Overflow
0
no_proxy_match (const char *host, const char **no_proxy) { if (!no_proxy) return false; else return sufmatch (no_proxy, host); }
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,568
retr_rate (wgint bytes, double secs) { static char res[20]; static const char *rate_names[] = {"B/s", "KB/s", "MB/s", "GB/s" }; static const char *rate_names_bits[] = {"b/s", "Kb/s", "Mb/s", "Gb/s" }; int units; double dlrate = calc_rate (bytes, secs, &units); /* Use more digits for smaller numbers (regard...
Overflow
0
retr_rate (wgint bytes, double secs) { static char res[20]; static const char *rate_names[] = {"B/s", "KB/s", "MB/s", "GB/s" }; static const char *rate_names_bits[] = {"b/s", "Kb/s", "Mb/s", "Gb/s" }; int units; double dlrate = calc_rate (bytes, secs, &units); /* Use more digits for smaller numbers (regard...
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,569
retrieve_url (struct url * orig_parsed, const char *origurl, char **file, char **newloc, const char *refurl, int *dt, bool recursive, struct iri *iri, bool register_status) { uerr_t result; char *url; bool location_changed; bool iri_fallbacked = 0; int dummy; char *mynewloc, *pro...
Overflow
0
retrieve_url (struct url * orig_parsed, const char *origurl, char **file, char **newloc, const char *refurl, int *dt, bool recursive, struct iri *iri, bool register_status) { uerr_t result; char *url; bool location_changed; bool iri_fallbacked = 0; int dummy; char *mynewloc, *pro...
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,570
set_local_file (const char **file, const char *default_file) { if (opt.output_document) { if (output_stream_regular) *file = opt.output_document; } else *file = default_file; }
Overflow
0
set_local_file (const char **file, const char *default_file) { if (opt.output_document) { if (output_stream_regular) *file = opt.output_document; } else *file = default_file; }
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,571
sleep_between_retrievals (int count) { static bool first_retrieval = true; if (first_retrieval) { /* Don't sleep before the very first retrieval. */ first_retrieval = false; return; } if (opt.waitretry && count > 1) { /* If opt.waitretry is specified and this is a retry, wait...
Overflow
0
sleep_between_retrievals (int count) { static bool first_retrieval = true; if (first_retrieval) { /* Don't sleep before the very first retrieval. */ first_retrieval = false; return; } if (opt.waitretry && count > 1) { /* If opt.waitretry is specified and this is a retry, wait...
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,572
write_data (FILE *out, FILE *out2, const char *buf, int bufsize, wgint *skip, wgint *written) { if (out == NULL && out2 == NULL) return 1; if (*skip > bufsize) { *skip -= bufsize; return 1; } if (*skip) { buf += *skip; bufsize -= *skip; *skip = 0; if...
Overflow
0
write_data (FILE *out, FILE *out2, const char *buf, int bufsize, wgint *skip, wgint *written) { if (out == NULL && out2 == NULL) return 1; if (*skip > bufsize) { *skip -= bufsize; return 1; } if (*skip) { buf += *skip; bufsize -= *skip; *skip = 0; if...
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,573
zalloc (voidpf opaque, unsigned int items, unsigned int size) { (void) opaque; return (voidpf) xcalloc (items, size); }
Overflow
0
zalloc (voidpf opaque, unsigned int items, unsigned int size) { (void) opaque; return (voidpf) xcalloc (items, size); }
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,574
zfree (voidpf opaque, voidpf address) { (void) opaque; xfree (address); }
Overflow
0
zfree (voidpf opaque, voidpf address) { (void) opaque; xfree (address); }
@@ -378,6 +378,12 @@ fd_read_body (const char *downloaded_filename, int fd, FILE *out, wgint toread, remaining_chunk_size = strtol (line, &endl, 16); xfree (line); + if (remaining_chunk_size < 0) + { + ret = -1; + break; + ...
CWE-119
null
null
2,575
void aes_crypt_cbc( aes_context *ctx, int mode, int length, unsigned char iv[16], const unsigned char *input, unsigned char *output ) { int i; unsigned char temp[16]; #if defined(XYSSL_PADLOCK_C) && defined(XYSS...
Exec Code Overflow
0
void aes_crypt_cbc( aes_context *ctx, int mode, int length, unsigned char iv[16], const unsigned char *input, unsigned char *output ) { int i; unsigned char temp[16]; #if defined(XYSSL_PADLOCK_C) && defined(XYSS...
@@ -662,6 +662,9 @@ void aes_crypt_ecb( aes_context *ctx, } #endif + if (ctx == NULL || ctx->rk == NULL) + return; + RK = ctx->rk; GET_ULONG_LE( X0, input, 0 ); X0 ^= *RK++;
CWE-119
null
null
2,576
void aes_crypt_cfb( aes_context *ctx, int mode, int length, int *iv_off, unsigned char iv[16], const unsigned char *input, unsigned char *output ) { int c, n = *iv_off; if( mode == AES_DECRYP...
Exec Code Overflow
0
void aes_crypt_cfb( aes_context *ctx, int mode, int length, int *iv_off, unsigned char iv[16], const unsigned char *input, unsigned char *output ) { int c, n = *iv_off; if( mode == AES_DECRYP...
@@ -662,6 +662,9 @@ void aes_crypt_ecb( aes_context *ctx, } #endif + if (ctx == NULL || ctx->rk == NULL) + return; + RK = ctx->rk; GET_ULONG_LE( X0, input, 0 ); X0 ^= *RK++;
CWE-119
null
null
2,577
static void aes_gen_tables( void ) { int i, x, y, z; int pow[256]; int log[256]; /* * compute pow and log tables over GF(2^8) */ for( i = 0, x = 1; i < 256; i++ ) { pow[i] = x; log[x] = i; x = ( x ^ XTIME( x ) ) & 0xFF; } /* * calculate the round ...
Exec Code Overflow
0
static void aes_gen_tables( void ) { int i, x, y, z; int pow[256]; int log[256]; /* * compute pow and log tables over GF(2^8) */ for( i = 0, x = 1; i < 256; i++ ) { pow[i] = x; log[x] = i; x = ( x ^ XTIME( x ) ) & 0xFF; } /* * calculate the round ...
@@ -662,6 +662,9 @@ void aes_crypt_ecb( aes_context *ctx, } #endif + if (ctx == NULL || ctx->rk == NULL) + return; + RK = ctx->rk; GET_ULONG_LE( X0, input, 0 ); X0 ^= *RK++;
CWE-119
null
null
2,578
int aes_self_test( int verbose ) { int i, j, u, v, offset; unsigned char key[32]; unsigned char buf[16]; unsigned char prv[16]; unsigned char iv[16]; aes_context ctx; memset( key, 0, 32 ); /* * ECB mode */ for( i = 0; i < 6; i++ ) { u = i >> 1; v = i ...
Exec Code Overflow
0
int aes_self_test( int verbose ) { int i, j, u, v, offset; unsigned char key[32]; unsigned char buf[16]; unsigned char prv[16]; unsigned char iv[16]; aes_context ctx; memset( key, 0, 32 ); /* * ECB mode */ for( i = 0; i < 6; i++ ) { u = i >> 1; v = i ...
@@ -662,6 +662,9 @@ void aes_crypt_ecb( aes_context *ctx, } #endif + if (ctx == NULL || ctx->rk == NULL) + return; + RK = ctx->rk; GET_ULONG_LE( X0, input, 0 ); X0 ^= *RK++;
CWE-119
null
null
2,579
void aes_setkey_dec( aes_context *ctx, const unsigned char *key, int keysize ) { int i, j; aes_context cty; unsigned long *RK; unsigned long *SK; switch( keysize ) { case 128: ctx->nr = 10; break; case 192: ctx->nr = 12; break; case 256: ctx->nr = 14; break; defa...
Exec Code Overflow
0
void aes_setkey_dec( aes_context *ctx, const unsigned char *key, int keysize ) { int i, j; aes_context cty; unsigned long *RK; unsigned long *SK; switch( keysize ) { case 128: ctx->nr = 10; break; case 192: ctx->nr = 12; break; case 256: ctx->nr = 14; break; defa...
@@ -662,6 +662,9 @@ void aes_crypt_ecb( aes_context *ctx, } #endif + if (ctx == NULL || ctx->rk == NULL) + return; + RK = ctx->rk; GET_ULONG_LE( X0, input, 0 ); X0 ^= *RK++;
CWE-119
null
null
2,580
void aes_setkey_enc( aes_context *ctx, const unsigned char *key, int keysize ) { int i; unsigned long *RK; #if !defined(XYSSL_AES_ROM_TABLES) if( aes_init_done == 0 ) { aes_gen_tables(); aes_init_done = 1; } #endif switch( keysize ) { case 128: ctx->nr = 10; break; ...
Exec Code Overflow
0
void aes_setkey_enc( aes_context *ctx, const unsigned char *key, int keysize ) { int i; unsigned long *RK; #if !defined(XYSSL_AES_ROM_TABLES) if( aes_init_done == 0 ) { aes_gen_tables(); aes_init_done = 1; } #endif switch( keysize ) { case 128: ctx->nr = 10; break; ...
@@ -662,6 +662,9 @@ void aes_crypt_ecb( aes_context *ctx, } #endif + if (ctx == NULL || ctx->rk == NULL) + return; + RK = ctx->rk; GET_ULONG_LE( X0, input, 0 ); X0 ^= *RK++;
CWE-119
null
null
2,581
int main(int argc, char *argv[]) { return aes_self_test(1); }
Exec Code Overflow
0
int main(int argc, char *argv[]) { return aes_self_test(1); }
@@ -662,6 +662,9 @@ void aes_crypt_ecb( aes_context *ctx, } #endif + if (ctx == NULL || ctx->rk == NULL) + return; + RK = ctx->rk; GET_ULONG_LE( X0, input, 0 ); X0 ^= *RK++;
CWE-119
null
null
2,582
s_aes_release(stream_state *ss) { stream_aes_state *const state = (stream_aes_state *) ss; if (state->ctx != NULL) gs_free_object(state->memory, state->ctx, "aes context structure"); }
Exec Code Overflow
0
s_aes_release(stream_state *ss) { stream_aes_state *const state = (stream_aes_state *) ss; if (state->ctx != NULL) gs_free_object(state->memory, state->ctx, "aes context structure"); }
@@ -120,6 +120,7 @@ s_aes_process(stream_state * ss, stream_cursor_read * pr, gs_throw(gs_error_VMerror, "could not allocate aes context"); return ERRC; } + memset(state->ctx, 0x00, sizeof(aes_context)); if (state->keylength < 1 || state->keylength > SAES_MAX_KEYLENGTH) { g...
CWE-119
null
null
2,583
s_aes_set_key(stream_aes_state * state, const unsigned char *key, int keylength) { int code = 0; if ( (keylength < 1) || (keylength > SAES_MAX_KEYLENGTH) ) return_error(gs_error_rangecheck); if (key == NULL) return_error(gs_error_invalidaccess); /* we can't set the ke...
Exec Code Overflow
0
s_aes_set_key(stream_aes_state * state, const unsigned char *key, int keylength) { int code = 0; if ( (keylength < 1) || (keylength > SAES_MAX_KEYLENGTH) ) return_error(gs_error_rangecheck); if (key == NULL) return_error(gs_error_invalidaccess); /* we can't set the ke...
@@ -120,6 +120,7 @@ s_aes_process(stream_state * ss, stream_cursor_read * pr, gs_throw(gs_error_VMerror, "could not allocate aes context"); return ERRC; } + memset(state->ctx, 0x00, sizeof(aes_context)); if (state->keylength < 1 || state->keylength > SAES_MAX_KEYLENGTH) { g...
CWE-119
null
null
2,584
s_aes_set_padding(stream_aes_state *state, int use_padding) { state->use_padding = use_padding; }
Exec Code Overflow
0
s_aes_set_padding(stream_aes_state *state, int use_padding) { state->use_padding = use_padding; }
@@ -120,6 +120,7 @@ s_aes_process(stream_state * ss, stream_cursor_read * pr, gs_throw(gs_error_VMerror, "could not allocate aes context"); return ERRC; } + memset(state->ctx, 0x00, sizeof(aes_context)); if (state->keylength < 1 || state->keylength > SAES_MAX_KEYLENGTH) { g...
CWE-119
null
null
2,585
gdev_pdf_get_param(gx_device *dev, char *Param, void *list) { gx_device_pdf *pdev = (gx_device_pdf *)dev; const gs_param_item_t *pi; gs_param_list * plist = (gs_param_list *)list; int code = 0; for (pi = pdf_param_items; pi->key != 0; ++pi) { if (strcmp(pi->key, Param) == 0) { c...
Exec Code
0
gdev_pdf_get_param(gx_device *dev, char *Param, void *list) { gx_device_pdf *pdev = (gx_device_pdf *)dev; const gs_param_item_t *pi; gs_param_list * plist = (gs_param_list *)list; int code = 0; for (pi = pdf_param_items; pi->key != 0; ++pi) { if (strcmp(pi->key, Param) == 0) { c...
@@ -364,7 +364,7 @@ gdev_pdf_put_params_impl(gx_device * dev, const gx_device_pdf * save_dev, gs_par * LockDistillerParams is read again, and reset if necessary, in * psdf_put_params. */ - ecode = param_read_bool(plist, "LockDistillerParams", &locked); + ecode = param_read_bool(plist, (param_nam...
CWE-704
null
null
2,586
gdev_pdf_put_params(gx_device * dev, gs_param_list * plist) { int code; gx_device_pdf *pdev = (gx_device_pdf *) dev; gs_memory_t *mem = gs_memory_stable(pdev->memory); gx_device_pdf *save_dev = gs_malloc(mem, sizeof(gx_device_pdf), 1, "saved gx_device_pdf"); if (!save_dev) return_er...
Exec Code
0
gdev_pdf_put_params(gx_device * dev, gs_param_list * plist) { int code; gx_device_pdf *pdev = (gx_device_pdf *) dev; gs_memory_t *mem = gs_memory_stable(pdev->memory); gx_device_pdf *save_dev = gs_malloc(mem, sizeof(gx_device_pdf), 1, "saved gx_device_pdf"); if (!save_dev) return_er...
@@ -364,7 +364,7 @@ gdev_pdf_put_params_impl(gx_device * dev, const gx_device_pdf * save_dev, gs_par * LockDistillerParams is read again, and reset if necessary, in * psdf_put_params. */ - ecode = param_read_bool(plist, "LockDistillerParams", &locked); + ecode = param_read_bool(plist, (param_nam...
CWE-704
null
null
2,587
static int unescape_octals(gx_device_pdf * pdev, char *src, int size) { char *start, *dest; start = src; dest = src; while(size) { if (size > 4 && src[0] == '\\' && src[1] == '\\' && src[2] > 0x29 && src[2] < 0x35 && src[3] > 0x29 &&src[3] < 0x38 && ...
Exec Code
0
static int unescape_octals(gx_device_pdf * pdev, char *src, int size) { char *start, *dest; start = src; dest = src; while(size) { if (size > 4 && src[0] == '\\' && src[1] == '\\' && src[2] > 0x29 && src[2] < 0x35 && src[3] > 0x29 &&src[3] < 0x38 && ...
@@ -364,7 +364,7 @@ gdev_pdf_put_params_impl(gx_device * dev, const gx_device_pdf * save_dev, gs_par * LockDistillerParams is read again, and reset if necessary, in * psdf_put_params. */ - ecode = param_read_bool(plist, "LockDistillerParams", &locked); + ecode = param_read_bool(plist, (param_nam...
CWE-704
null
null
2,588
array_indexed_param_list_read(dict_param_list * plist, const ref * parray, const ref * ppolicies, bool require_all, gs_ref_memory_t *ref_memory) { iparam_list *const iplist = (iparam_list *) plist; int code; check_read_type(*parray, t_array); ...
Exec Code
0
array_indexed_param_list_read(dict_param_list * plist, const ref * parray, const ref * ppolicies, bool require_all, gs_ref_memory_t *ref_memory) { iparam_list *const iplist = (iparam_list *) plist; int code; check_read_type(*parray, t_array); ...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,589
array_indexed_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { ref *const arr = &((dict_param_list *) plist)->dict; check_type(*pkey, t_integer); if (pkey->value.intval < 0 || pkey->value.intval >= r_size(arr)) return 1; ploc->pvalue = arr->value.refs + pkey->value.intval;...
Exec Code
0
array_indexed_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { ref *const arr = &((dict_param_list *) plist)->dict; check_type(*pkey, t_integer); if (pkey->value.intval < 0 || pkey->value.intval >= r_size(arr)) return 1; ploc->pvalue = arr->value.refs + pkey->value.intval;...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,590
array_new_indexed_param_write(iparam_list * iplist, const ref * pkey, const ref * pvalue) { const ref *const arr = &((dict_param_list *)iplist)->dict; ref *eltp; if (!r_has_type(pkey, t_integer)) return_error(gs_error_typecheck); check_int_ltu(*pkey, r_size(arr)); ...
Exec Code
0
array_new_indexed_param_write(iparam_list * iplist, const ref * pkey, const ref * pvalue) { const ref *const arr = &((dict_param_list *)iplist)->dict; ref *eltp; if (!r_has_type(pkey, t_integer)) return_error(gs_error_typecheck); check_int_ltu(*pkey, r_size(arr)); ...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,591
array_new_indexed_plist_write(dict_param_list * plist, ref * parray, const ref * pwanted, gs_ref_memory_t *imem) { check_array(*parray); check_write(*parray); plist->u.w.write = array_new_indexed_param_write; ref_param_write_init((iparam_list *) plist, pwanted, imem); p...
Exec Code
0
array_new_indexed_plist_write(dict_param_list * plist, ref * parray, const ref * pwanted, gs_ref_memory_t *imem) { check_array(*parray); check_write(*parray); plist->u.w.write = array_new_indexed_param_write; ref_param_write_init((iparam_list *) plist, pwanted, imem); p...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,592
array_param_enumerate(iparam_list * plist, gs_param_enumerator_t * penum, gs_param_key_t * key, ref_type * type) { int index = penum->intval; ref *bot = ((array_param_list *) plist)->bot; ref *ptr = bot + index; ref *top = ((array_param_list *) plist)->top; for (; ptr < top; p...
Exec Code
0
array_param_enumerate(iparam_list * plist, gs_param_enumerator_t * penum, gs_param_key_t * key, ref_type * type) { int index = penum->intval; ref *bot = ((array_param_list *) plist)->bot; ref *ptr = bot + index; ref *top = ((array_param_list *) plist)->top; for (; ptr < top; p...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,593
array_param_list_read(array_param_list * plist, ref * bot, uint count, const ref * ppolicies, bool require_all, gs_ref_memory_t *imem) { iparam_list *const iplist = (iparam_list *) plist; if (count & 1) return_error(gs_error_rangecheck); plist->u.r.read =...
Exec Code
0
array_param_list_read(array_param_list * plist, ref * bot, uint count, const ref * ppolicies, bool require_all, gs_ref_memory_t *imem) { iparam_list *const iplist = (iparam_list *) plist; if (count & 1) return_error(gs_error_rangecheck); plist->u.r.read =...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,594
array_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { ref *bot = ((array_param_list *) plist)->bot; ref *ptr = bot; ref *top = ((array_param_list *) plist)->top; for (; ptr < top; ptr += 2) { if (r_has_type(ptr, t_name) && name_eq(ptr, pkey)) { ploc->pvalue = ...
Exec Code
0
array_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { ref *bot = ((array_param_list *) plist)->bot; ref *ptr = bot; ref *top = ((array_param_list *) plist)->top; for (; ptr < top; ptr += 2) { if (r_has_type(ptr, t_name) && name_eq(ptr, pkey)) { ploc->pvalue = ...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,595
dict_param_list_read(dict_param_list * plist, const ref * pdict, const ref * ppolicies, bool require_all, gs_ref_memory_t *imem) { iparam_list *const iplist = (iparam_list *) plist; uint count; if (pdict == 0) { plist->u.r.read = empty_param_read; c...
Exec Code
0
dict_param_list_read(dict_param_list * plist, const ref * pdict, const ref * ppolicies, bool require_all, gs_ref_memory_t *imem) { iparam_list *const iplist = (iparam_list *) plist; uint count; if (pdict == 0) { plist->u.r.read = empty_param_read; c...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,596
dict_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { ref const *spdict = &((dict_param_list *) plist)->dict; int code = dict_find(spdict, pkey, &ploc->pvalue); if (code != 1) return 1; ploc->presult = &plist->results[dict_value_index(spdict, ploc->pvalue)]; *p...
Exec Code
0
dict_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { ref const *spdict = &((dict_param_list *) plist)->dict; int code = dict_find(spdict, pkey, &ploc->pvalue); if (code != 1) return 1; ploc->presult = &plist->results[dict_value_index(spdict, ploc->pvalue)]; *p...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,597
dict_param_write(iparam_list * plist, const ref * pkey, const ref * pvalue) { int code = dict_put(&((dict_param_list *) plist)->dict, pkey, pvalue, NULL); return min(code, 0); }
Exec Code
0
dict_param_write(iparam_list * plist, const ref * pkey, const ref * pvalue) { int code = dict_put(&((dict_param_list *) plist)->dict, pkey, pvalue, NULL); return min(code, 0); }
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,598
empty_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { return 1; }
Exec Code
0
empty_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { return 1; }
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null
2,599
ref_array_param_requested(const iparam_list *iplist, gs_param_name pkey, ref *pvalue, uint size, client_name_t cname) { int code; if (!ref_param_requested((const gs_param_list *)iplist, pkey)) return 0; code = gs_alloc_ref_array(iplist->ref_memory, pvalue, a_all, size, cna...
Exec Code
0
ref_array_param_requested(const iparam_list *iplist, gs_param_name pkey, ref *pvalue, uint size, client_name_t cname) { int code; if (!ref_param_requested((const gs_param_list *)iplist, pkey)) return 0; code = gs_alloc_ref_array(iplist->ref_memory, pvalue, a_all, size, cna...
@@ -822,10 +822,11 @@ static int ref_param_read_signal_error(gs_param_list * plist, gs_param_name pkey, int code) { iparam_list *const iplist = (iparam_list *) plist; - iparam_loc loc; + iparam_loc loc = {0}; - ref_param_read(iplist, pkey, &loc, -1); /* can't fail */ - *loc.presult = code; + ...
CWE-704
null
null