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,600
ref_param_begin_write_collection(gs_param_list * plist, gs_param_name pkey, gs_param_dict * pvalue, gs_param_collection_type_t coll_type) { iparam_list *const iplist = (iparam_list *) plist; gs_ref_memory_t *imem = iplist->ref_memory; dict_pa...
Exec Code
0
ref_param_begin_write_collection(gs_param_list * plist, gs_param_name pkey, gs_param_dict * pvalue, gs_param_collection_type_t coll_type) { iparam_list *const iplist = (iparam_list *) plist; gs_ref_memory_t *imem = iplist->ref_memory; dict_pa...
@@ -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,601
ref_param_end_read_collection(gs_param_list * plist, gs_param_name pkey, gs_param_dict * pvalue) { iparam_list_release((dict_param_list *) pvalue->list); gs_free_object(plist->memory, pvalue->list, "ref_param_end_read_collection"); return 0; }
Exec Code
0
ref_param_end_read_collection(gs_param_list * plist, gs_param_name pkey, gs_param_dict * pvalue) { iparam_list_release((dict_param_list *) pvalue->list); gs_free_object(plist->memory, pvalue->list, "ref_param_end_read_collection"); return 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,602
ref_param_get_next_key(gs_param_list * plist, gs_param_enumerator_t * penum, gs_param_key_t * key) { ref_type keytype; /* result not needed here */ iparam_list *const pilist = (iparam_list *) plist; return (*pilist->enumerate) (pilist, penum, key, &keytype); }
Exec Code
0
ref_param_get_next_key(gs_param_list * plist, gs_param_enumerator_t * penum, gs_param_key_t * key) { ref_type keytype; /* result not needed here */ iparam_list *const pilist = (iparam_list *) plist; return (*pilist->enumerate) (pilist, penum, key, &keytype); }
@@ -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,603
ref_param_make_float(ref *pe, const void *pvalue, uint i, gs_ref_memory_t *imem) { make_tav(pe, t_real, imemory_new_mask(imem), realval, ((const gs_param_float_array *)pvalue)->data[i]); return 0; }
Exec Code
0
ref_param_make_float(ref *pe, const void *pvalue, uint i, gs_ref_memory_t *imem) { make_tav(pe, t_real, imemory_new_mask(imem), realval, ((const gs_param_float_array *)pvalue)->data[i]); return 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,604
ref_param_make_name(ref * pe, const void *pvalue, uint i, gs_ref_memory_t *imem) { return ref_param_write_name_value((const gs_memory_t *)imem, pe, &((const gs_param_string_array *)pvalue)->data[i]); }
Exec Code
0
ref_param_make_name(ref * pe, const void *pvalue, uint i, gs_ref_memory_t *imem) { return ref_param_write_name_value((const gs_memory_t *)imem, pe, &((const gs_param_string_array *)pvalue)->data[i]); }
@@ -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,605
ref_param_make_string(ref *pe, const void *pvalue, uint i, gs_ref_memory_t *imem) { return ref_param_write_string_value(pe, &((const gs_param_string_array *)pvalue)->data[i], imem); }
Exec Code
0
ref_param_make_string(ref *pe, const void *pvalue, uint i, gs_ref_memory_t *imem) { return ref_param_write_string_value(pe, &((const gs_param_string_array *)pvalue)->data[i], imem); }
@@ -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,606
ref_param_read_array(iparam_list * plist, gs_param_name pkey, iparam_loc * ploc) { int code = ref_param_read(plist, pkey, ploc, -1); if (code != 0) return code; if (!r_is_array(ploc->pvalue)) return iparam_note_error(*ploc, gs_error_typecheck); iparam_check_read(*ploc); return 0; }
Exec Code
0
ref_param_read_array(iparam_list * plist, gs_param_name pkey, iparam_loc * ploc) { int code = ref_param_read(plist, pkey, ploc, -1); if (code != 0) return code; if (!r_is_array(ploc->pvalue)) return iparam_note_error(*ploc, gs_error_typecheck); iparam_check_read(*ploc); return 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,607
ref_param_read_get_policy(gs_param_list * plist, gs_param_name pkey) { iparam_list *const iplist = (iparam_list *) plist; ref *pvalue; if (!(r_has_type(&iplist->u.r.policies, t_dictionary) && dict_find_string(&iplist->u.r.policies, pkey, &pvalue) > 0 && r_has_type(pvalue, t_integer)) ...
Exec Code
0
ref_param_read_get_policy(gs_param_list * plist, gs_param_name pkey) { iparam_list *const iplist = (iparam_list *) plist; ref *pvalue; if (!(r_has_type(&iplist->u.r.policies, t_dictionary) && dict_find_string(&iplist->u.r.policies, pkey, &pvalue) > 0 && r_has_type(pvalue, t_integer)) ...
@@ -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,608
ref_param_read_init(iparam_list * plist, uint count, const ref * ppolicies, bool require_all, gs_ref_memory_t *imem) { gs_param_list_init((gs_param_list *)plist, &ref_read_procs, (gs_memory_t *)imem); plist->ref_memory = imem; if (ppolicies == 0) make_null(...
Exec Code
0
ref_param_read_init(iparam_list * plist, uint count, const ref * ppolicies, bool require_all, gs_ref_memory_t *imem) { gs_param_list_init((gs_param_list *)plist, &ref_read_procs, (gs_memory_t *)imem); plist->ref_memory = imem; if (ppolicies == 0) make_null(...
@@ -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,609
ref_param_read_int_array(gs_param_list * plist, gs_param_name pkey, gs_param_int_array * pvalue) { iparam_list *const iplist = (iparam_list *) plist; iparam_loc loc; int code = ref_param_read_array(iplist, pkey, &loc); int *piv; uint size; long i; if (code != 0) ...
Exec Code
0
ref_param_read_int_array(gs_param_list * plist, gs_param_name pkey, gs_param_int_array * pvalue) { iparam_list *const iplist = (iparam_list *) plist; iparam_loc loc; int code = ref_param_read_array(iplist, pkey, &loc); int *piv; uint size; long i; if (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,610
ref_param_read_string_array(gs_param_list * plist, gs_param_name pkey, gs_param_string_array * pvalue) { iparam_list *const iplist = (iparam_list *) plist; iparam_loc loc; ref aref; int code = ref_param_read_array(iplist, pkey, &loc); gs_param_string *psv; uint size; ...
Exec Code
0
ref_param_read_string_array(gs_param_list * plist, gs_param_name pkey, gs_param_string_array * pvalue) { iparam_list *const iplist = (iparam_list *) plist; iparam_loc loc; ref aref; int code = ref_param_read_array(iplist, pkey, &loc); gs_param_string *psv; uint size; ...
@@ -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,611
ref_param_read_typed(gs_param_list * plist, gs_param_name pkey, gs_param_typed_value * pvalue) { iparam_list *const iplist = (iparam_list *) plist; iparam_loc loc; ref elt; int code = ref_param_read(iplist, pkey, &loc, -1); if (code != 0) return code; switch (r_type...
Exec Code
0
ref_param_read_typed(gs_param_list * plist, gs_param_name pkey, gs_param_typed_value * pvalue) { iparam_list *const iplist = (iparam_list *) plist; iparam_loc loc; ref elt; int code = ref_param_read(iplist, pkey, &loc, -1); if (code != 0) return code; switch (r_type...
@@ -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,612
ref_param_requested(const gs_param_list * plist, gs_param_name pkey) { const iparam_list *const ciplist = (const iparam_list *)plist; ref kref; ref *ignore_value; if (!r_has_type(&ciplist->u.w.wanted, t_dictionary)) return -1; if (ref_param_key(ciplist, pkey, &kref) < 0) return -1; ...
Exec Code
0
ref_param_requested(const gs_param_list * plist, gs_param_name pkey) { const iparam_list *const ciplist = (const iparam_list *)plist; ref kref; ref *ignore_value; if (!r_has_type(&ciplist->u.w.wanted, t_dictionary)) return -1; if (ref_param_key(ciplist, pkey, &kref) < 0) 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,613
ref_param_write(iparam_list * plist, gs_param_name pkey, const ref * pvalue) { ref kref; int code; if (!ref_param_requested((gs_param_list *) plist, pkey)) return 0; code = ref_param_key(plist, pkey, &kref); if (code < 0) return code; return (*plist->u.w.write) (plist, &kref, pv...
Exec Code
0
ref_param_write(iparam_list * plist, gs_param_name pkey, const ref * pvalue) { ref kref; int code; if (!ref_param_requested((gs_param_list *) plist, pkey)) return 0; code = ref_param_key(plist, pkey, &kref); if (code < 0) return code; return (*plist->u.w.write) (plist, &kref, pv...
@@ -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,614
ref_param_write_init(iparam_list * plist, const ref * pwanted, gs_ref_memory_t *imem) { gs_param_list_init((gs_param_list *)plist, &ref_write_procs, (gs_memory_t *)imem); plist->ref_memory = imem; if (pwanted == 0) make_null(&plist->u.w.wanted); else ...
Exec Code
0
ref_param_write_init(iparam_list * plist, const ref * pwanted, gs_ref_memory_t *imem) { gs_param_list_init((gs_param_list *)plist, &ref_write_procs, (gs_memory_t *)imem); plist->ref_memory = imem; if (pwanted == 0) make_null(&plist->u.w.wanted); else ...
@@ -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,615
ref_param_write_name_value(const gs_memory_t *mem, ref * pref, const gs_param_string * pvalue) { return name_ref(mem, pvalue->data, pvalue->size, pref, (pvalue->persistent ? 0 : 1)); }
Exec Code
0
ref_param_write_name_value(const gs_memory_t *mem, ref * pref, const gs_param_string * pvalue) { return name_ref(mem, pvalue->data, pvalue->size, pref, (pvalue->persistent ? 0 : 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,616
ref_param_write_typed(gs_param_list * plist, gs_param_name pkey, gs_param_typed_value * pvalue) { iparam_list *const iplist = (iparam_list *) plist; ref value; int code = 0; switch (pvalue->type) { case gs_param_type_null: make_null(&value); break; ...
Exec Code
0
ref_param_write_typed(gs_param_list * plist, gs_param_name pkey, gs_param_typed_value * pvalue) { iparam_list *const iplist = (iparam_list *) plist; ref value; int code = 0; switch (pvalue->type) { case gs_param_type_null: make_null(&value); break; ...
@@ -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,617
stack_param_enumerate(iparam_list * plist, gs_param_enumerator_t * penum, gs_param_key_t * key, ref_type * type) { int code; stack_param_list *const splist = (stack_param_list *) plist; int index = penum->intval; ref *stack_element; do { stack_element = ref...
Exec Code
0
stack_param_enumerate(iparam_list * plist, gs_param_enumerator_t * penum, gs_param_key_t * key, ref_type * type) { int code; stack_param_list *const splist = (stack_param_list *) plist; int index = penum->intval; ref *stack_element; do { stack_element = ref...
@@ -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,618
stack_param_list_read(stack_param_list * plist, ref_stack_t * pstack, uint skip, const ref * ppolicies, bool require_all, gs_ref_memory_t *imem) { iparam_list *const iplist = (iparam_list *) plist; uint count = ref_stack_counttomark(pstack); if (count == 0) ...
Exec Code
0
stack_param_list_read(stack_param_list * plist, ref_stack_t * pstack, uint skip, const ref * ppolicies, bool require_all, gs_ref_memory_t *imem) { iparam_list *const iplist = (iparam_list *) plist; uint count = ref_stack_counttomark(pstack); if (count == 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,619
stack_param_list_write(stack_param_list * plist, ref_stack_t * pstack, const ref * pwanted, gs_ref_memory_t *imem) { plist->u.w.write = stack_param_write; ref_param_write_init((iparam_list *) plist, pwanted, imem); plist->enumerate = stack_param_enumerate; plist->pstack = pstack; ...
Exec Code
0
stack_param_list_write(stack_param_list * plist, ref_stack_t * pstack, const ref * pwanted, gs_ref_memory_t *imem) { plist->u.w.write = stack_param_write; ref_param_write_init((iparam_list *) plist, pwanted, imem); plist->enumerate = stack_param_enumerate; plist->pstack = pstack; ...
@@ -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,620
stack_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { stack_param_list *const splist = (stack_param_list *) plist; ref_stack_t *pstack = splist->pstack; /* This implementation is slow, but it probably doesn't matter. */ uint index = splist->skip + 1; uint count = splist->coun...
Exec Code
0
stack_param_read(iparam_list * plist, const ref * pkey, iparam_loc * ploc) { stack_param_list *const splist = (stack_param_list *) plist; ref_stack_t *pstack = splist->pstack; /* This implementation is slow, but it probably doesn't matter. */ uint index = splist->skip + 1; uint count = splist->coun...
@@ -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,621
stack_param_write(iparam_list * plist, const ref * pkey, const ref * pvalue) { stack_param_list *const splist = (stack_param_list *) plist; ref_stack_t *pstack = splist->pstack; s_ptr p = pstack->p; if (pstack->top - p < 2) { int code = ref_stack_push(pstack, 2); if (code < 0) ...
Exec Code
0
stack_param_write(iparam_list * plist, const ref * pkey, const ref * pvalue) { stack_param_list *const splist = (stack_param_list *) plist; ref_stack_t *pstack = splist->pstack; s_ptr p = pstack->p; if (pstack->top - p < 2) { int code = ref_stack_push(pstack, 2); if (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,622
static inline FDrive *drv0(FDCtrl *fdctrl) { return &fdctrl->drives[(fdctrl->tdr & FD_TDR_BOOTSEL) >> 2]; }
DoS Exec Code Overflow
0
static inline FDrive *drv0(FDCtrl *fdctrl) { return &fdctrl->drives[(fdctrl->tdr & FD_TDR_BOOTSEL) >> 2]; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,623
static inline FDrive *drv1(FDCtrl *fdctrl) { if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (1 << 2)) return &fdctrl->drives[1]; else return &fdctrl->drives[0]; }
DoS Exec Code Overflow
0
static inline FDrive *drv1(FDCtrl *fdctrl) { if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (1 << 2)) return &fdctrl->drives[1]; else return &fdctrl->drives[0]; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,624
static inline FDrive *drv2(FDCtrl *fdctrl) { if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (2 << 2)) return &fdctrl->drives[2]; else return &fdctrl->drives[1]; }
DoS Exec Code Overflow
0
static inline FDrive *drv2(FDCtrl *fdctrl) { if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (2 << 2)) return &fdctrl->drives[2]; else return &fdctrl->drives[1]; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,625
static inline FDrive *drv3(FDCtrl *fdctrl) { if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (3 << 2)) return &fdctrl->drives[3]; else return &fdctrl->drives[2]; }
DoS Exec Code Overflow
0
static inline FDrive *drv3(FDCtrl *fdctrl) { if ((fdctrl->tdr & FD_TDR_BOOTSEL) < (3 << 2)) return &fdctrl->drives[3]; else return &fdctrl->drives[2]; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,626
static void fd_init(FDrive *drv) { /* Drive */ drv->drive = FDRIVE_DRV_NONE; drv->perpendicular = 0; /* Disk */ drv->last_sect = 0; drv->max_track = 0; }
DoS Exec Code Overflow
0
static void fd_init(FDrive *drv) { /* Drive */ drv->drive = FDRIVE_DRV_NONE; drv->perpendicular = 0; /* Disk */ drv->last_sect = 0; drv->max_track = 0; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,627
static void fd_revalidate(FDrive *drv) { int nb_heads, max_track, last_sect, ro; FDriveType drive; FDriveRate rate; FLOPPY_DPRINTF("revalidate\n"); if (drv->blk != NULL) { ro = blk_is_read_only(drv->blk); pick_geometry(drv->blk, &nb_heads, &max_track, &last_sec...
DoS Exec Code Overflow
0
static void fd_revalidate(FDrive *drv) { int nb_heads, max_track, last_sect, ro; FDriveType drive; FDriveRate rate; FLOPPY_DPRINTF("revalidate\n"); if (drv->blk != NULL) { ro = blk_is_read_only(drv->blk); pick_geometry(drv->blk, &nb_heads, &max_track, &last_sec...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,628
static int fd_sector(FDrive *drv) { return fd_sector_calc(drv->head, drv->track, drv->sect, drv->last_sect, NUM_SIDES(drv)); }
DoS Exec Code Overflow
0
static int fd_sector(FDrive *drv) { return fd_sector_calc(drv->head, drv->track, drv->sect, drv->last_sect, NUM_SIDES(drv)); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,629
static int fd_sector_calc(uint8_t head, uint8_t track, uint8_t sect, uint8_t last_sect, uint8_t num_sides) { return (((track * num_sides) + head) * last_sect) + sect - 1; }
DoS Exec Code Overflow
0
static int fd_sector_calc(uint8_t head, uint8_t track, uint8_t sect, uint8_t last_sect, uint8_t num_sides) { return (((track * num_sides) + head) * last_sect) + sect - 1; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,630
static void fdc_pre_save(void *opaque) { FDCtrl *s = opaque; s->dor_vmstate = s->dor | GET_CUR_DRV(s); }
DoS Exec Code Overflow
0
static void fdc_pre_save(void *opaque) { FDCtrl *s = opaque; s->dor_vmstate = s->dor | GET_CUR_DRV(s); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,631
static bool fdc_reset_sensei_needed(void *opaque) { FDCtrl *s = opaque; return s->reset_sensei != 0; }
DoS Exec Code Overflow
0
static bool fdc_reset_sensei_needed(void *opaque) { FDCtrl *s = opaque; return s->reset_sensei != 0; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,632
static bool fdc_result_timer_needed(void *opaque) { FDCtrl *s = opaque; return timer_pending(s->result_timer); }
DoS Exec Code Overflow
0
static bool fdc_result_timer_needed(void *opaque) { FDCtrl *s = opaque; return timer_pending(s->result_timer); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,633
static void fdctrl_format_sector(FDCtrl *fdctrl) { FDrive *cur_drv; uint8_t kh, kt, ks; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); kt = fdctrl->fifo[6]; kh = fdctrl->fifo[7]; ks = fdctrl->fifo[8]; FLOPPY_DPRINTF("format sector at %d %d %02x %02...
DoS Exec Code Overflow
0
static void fdctrl_format_sector(FDCtrl *fdctrl) { FDrive *cur_drv; uint8_t kh, kt, ks; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); kt = fdctrl->fifo[6]; kh = fdctrl->fifo[7]; ks = fdctrl->fifo[8]; FLOPPY_DPRINTF("format sector at %d %d %02x %02...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,634
static void fdctrl_handle_configure(FDCtrl *fdctrl, int direction) { fdctrl->config = fdctrl->fifo[2]; fdctrl->precomp_trk = fdctrl->fifo[3]; /* No result back */ fdctrl_reset_fifo(fdctrl); }
DoS Exec Code Overflow
0
static void fdctrl_handle_configure(FDCtrl *fdctrl, int direction) { fdctrl->config = fdctrl->fifo[2]; fdctrl->precomp_trk = fdctrl->fifo[3]; /* No result back */ fdctrl_reset_fifo(fdctrl); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,635
static void fdctrl_handle_dumpreg(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); /* Drives position */ fdctrl->fifo[0] = drv0(fdctrl)->track; fdctrl->fifo[1] = drv1(fdctrl)->track; #if MAX_FD == 4 fdctrl->fifo[2] = drv2(fdctrl)->track; fdctrl->fifo[3] = drv3(fdctrl)->tr...
DoS Exec Code Overflow
0
static void fdctrl_handle_dumpreg(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); /* Drives position */ fdctrl->fifo[0] = drv0(fdctrl)->track; fdctrl->fifo[1] = drv1(fdctrl)->track; #if MAX_FD == 4 fdctrl->fifo[2] = drv2(fdctrl)->track; fdctrl->fifo[3] = drv3(fdctrl)->tr...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,636
static void fdctrl_handle_format_track(FDCtrl *fdctrl, int direction) { FDrive *cur_drv; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); fdctrl->data_state |= FD_STATE_FORMAT; if (fdctrl->fifo[0] & 0x80) fdctrl->data_state |= FD_STATE_MULTI; else ...
DoS Exec Code Overflow
0
static void fdctrl_handle_format_track(FDCtrl *fdctrl, int direction) { FDrive *cur_drv; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); fdctrl->data_state |= FD_STATE_FORMAT; if (fdctrl->fifo[0] & 0x80) fdctrl->data_state |= FD_STATE_MULTI; else ...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,637
static void fdctrl_handle_option(FDCtrl *fdctrl, int direction) { /* No result back */ fdctrl_reset_fifo(fdctrl); }
DoS Exec Code Overflow
0
static void fdctrl_handle_option(FDCtrl *fdctrl, int direction) { /* No result back */ fdctrl_reset_fifo(fdctrl); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,638
static void fdctrl_handle_partid(FDCtrl *fdctrl, int direction) { fdctrl->fifo[0] = 0x41; /* Stepping 1 */ fdctrl_set_fifo(fdctrl, 1); }
DoS Exec Code Overflow
0
static void fdctrl_handle_partid(FDCtrl *fdctrl, int direction) { fdctrl->fifo[0] = 0x41; /* Stepping 1 */ fdctrl_set_fifo(fdctrl, 1); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,639
static void fdctrl_handle_perpendicular_mode(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); if (fdctrl->fifo[1] & 0x80) cur_drv->perpendicular = fdctrl->fifo[1] & 0x7; /* No result back */ fdctrl_reset_fifo(fdctrl); }
DoS Exec Code Overflow
0
static void fdctrl_handle_perpendicular_mode(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); if (fdctrl->fifo[1] & 0x80) cur_drv->perpendicular = fdctrl->fifo[1] & 0x7; /* No result back */ fdctrl_reset_fifo(fdctrl); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,640
static void fdctrl_handle_powerdown_mode(FDCtrl *fdctrl, int direction) { fdctrl->pwrd = fdctrl->fifo[1]; fdctrl->fifo[0] = fdctrl->fifo[1]; fdctrl_set_fifo(fdctrl, 1); }
DoS Exec Code Overflow
0
static void fdctrl_handle_powerdown_mode(FDCtrl *fdctrl, int direction) { fdctrl->pwrd = fdctrl->fifo[1]; fdctrl->fifo[0] = fdctrl->fifo[1]; fdctrl_set_fifo(fdctrl, 1); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,641
static void fdctrl_handle_readid(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); cur_drv->head = (fdctrl->fifo[1] >> 2) & 1; timer_mod(fdctrl->result_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() / 50)); }
DoS Exec Code Overflow
0
static void fdctrl_handle_readid(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); cur_drv->head = (fdctrl->fifo[1] >> 2) & 1; timer_mod(fdctrl->result_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (get_ticks_per_sec() / 50)); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,642
static void fdctrl_handle_recalibrate(FDCtrl *fdctrl, int direction) { FDrive *cur_drv; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); fd_recalibrate(cur_drv); fdctrl_reset_fifo(fdctrl); /* Raise Interrupt */ fdctrl->status0 |= FD_SR0_SEEK; fdctrl_...
DoS Exec Code Overflow
0
static void fdctrl_handle_recalibrate(FDCtrl *fdctrl, int direction) { FDrive *cur_drv; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); fd_recalibrate(cur_drv); fdctrl_reset_fifo(fdctrl); /* Raise Interrupt */ fdctrl->status0 |= FD_SR0_SEEK; fdctrl_...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,643
static void fdctrl_handle_restore(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); /* Drives position */ drv0(fdctrl)->track = fdctrl->fifo[3]; drv1(fdctrl)->track = fdctrl->fifo[4]; #if MAX_FD == 4 drv2(fdctrl)->track = fdctrl->fifo[5]; drv3(fdctrl)->track = fdctrl->fifo...
DoS Exec Code Overflow
0
static void fdctrl_handle_restore(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); /* Drives position */ drv0(fdctrl)->track = fdctrl->fifo[3]; drv1(fdctrl)->track = fdctrl->fifo[4]; #if MAX_FD == 4 drv2(fdctrl)->track = fdctrl->fifo[5]; drv3(fdctrl)->track = fdctrl->fifo...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,644
static void fdctrl_handle_sense_interrupt_status(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); if (fdctrl->reset_sensei > 0) { fdctrl->fifo[0] = FD_SR0_RDYCHG + FD_RESET_SENSEI_COUNT - fdctrl->reset_sensei; fdctrl->reset_sensei--; } else if (!(fdctrl->s...
DoS Exec Code Overflow
0
static void fdctrl_handle_sense_interrupt_status(FDCtrl *fdctrl, int direction) { FDrive *cur_drv = get_cur_drv(fdctrl); if (fdctrl->reset_sensei > 0) { fdctrl->fifo[0] = FD_SR0_RDYCHG + FD_RESET_SENSEI_COUNT - fdctrl->reset_sensei; fdctrl->reset_sensei--; } else if (!(fdctrl->s...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,645
static void fdctrl_handle_tc(void *opaque, int irq, int level) { if (level) { FLOPPY_DPRINTF("TC pulsed\n"); } }
DoS Exec Code Overflow
0
static void fdctrl_handle_tc(void *opaque, int irq, int level) { if (level) { FLOPPY_DPRINTF("TC pulsed\n"); } }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,646
static void fdctrl_handle_version(FDCtrl *fdctrl, int direction) { /* Controller's version */ fdctrl->fifo[0] = fdctrl->version; fdctrl_set_fifo(fdctrl, 1); }
DoS Exec Code Overflow
0
static void fdctrl_handle_version(FDCtrl *fdctrl, int direction) { /* Controller's version */ fdctrl->fifo[0] = fdctrl->version; fdctrl_set_fifo(fdctrl, 1); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,647
static uint32_t fdctrl_read (void *opaque, uint32_t reg) { FDCtrl *fdctrl = opaque; uint32_t retval; reg &= 7; switch (reg) { case FD_REG_SRA: retval = fdctrl_read_statusA(fdctrl); break; case FD_REG_SRB: retval = fdctrl_read_statusB(fdctrl); break; case FD_R...
DoS Exec Code Overflow
0
static uint32_t fdctrl_read (void *opaque, uint32_t reg) { FDCtrl *fdctrl = opaque; uint32_t retval; reg &= 7; switch (reg) { case FD_REG_SRA: retval = fdctrl_read_statusA(fdctrl); break; case FD_REG_SRB: retval = fdctrl_read_statusB(fdctrl); break; case FD_R...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,648
static uint32_t fdctrl_read_dir(FDCtrl *fdctrl) { uint32_t retval = 0; if (fdctrl_media_changed(get_cur_drv(fdctrl))) { retval |= FD_DIR_DSKCHG; } if (retval != 0) { FLOPPY_DPRINTF("Floppy digital input register: 0x%02x\n", retval); } return retval; }
DoS Exec Code Overflow
0
static uint32_t fdctrl_read_dir(FDCtrl *fdctrl) { uint32_t retval = 0; if (fdctrl_media_changed(get_cur_drv(fdctrl))) { retval |= FD_DIR_DSKCHG; } if (retval != 0) { FLOPPY_DPRINTF("Floppy digital input register: 0x%02x\n", retval); } return retval; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,649
static uint32_t fdctrl_read_dor(FDCtrl *fdctrl) { uint32_t retval = fdctrl->dor; /* Selected drive */ retval |= fdctrl->cur_drv; FLOPPY_DPRINTF("digital output register: 0x%02x\n", retval); return retval; }
DoS Exec Code Overflow
0
static uint32_t fdctrl_read_dor(FDCtrl *fdctrl) { uint32_t retval = fdctrl->dor; /* Selected drive */ retval |= fdctrl->cur_drv; FLOPPY_DPRINTF("digital output register: 0x%02x\n", retval); return retval; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,650
static uint32_t fdctrl_read_main_status(FDCtrl *fdctrl) { uint32_t retval = fdctrl->msr; fdctrl->dsr &= ~FD_DSR_PWRDOWN; fdctrl->dor |= FD_DOR_nRESET; FLOPPY_DPRINTF("main status register: 0x%02x\n", retval); return retval; }
DoS Exec Code Overflow
0
static uint32_t fdctrl_read_main_status(FDCtrl *fdctrl) { uint32_t retval = fdctrl->msr; fdctrl->dsr &= ~FD_DSR_PWRDOWN; fdctrl->dor |= FD_DOR_nRESET; FLOPPY_DPRINTF("main status register: 0x%02x\n", retval); return retval; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,651
static uint32_t fdctrl_read_statusA(FDCtrl *fdctrl) { uint32_t retval = fdctrl->sra; FLOPPY_DPRINTF("status register A: 0x%02x\n", retval); return retval; }
DoS Exec Code Overflow
0
static uint32_t fdctrl_read_statusA(FDCtrl *fdctrl) { uint32_t retval = fdctrl->sra; FLOPPY_DPRINTF("status register A: 0x%02x\n", retval); return retval; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,652
static uint32_t fdctrl_read_statusB(FDCtrl *fdctrl) { uint32_t retval = fdctrl->srb; FLOPPY_DPRINTF("status register B: 0x%02x\n", retval); return retval; }
DoS Exec Code Overflow
0
static uint32_t fdctrl_read_statusB(FDCtrl *fdctrl) { uint32_t retval = fdctrl->srb; FLOPPY_DPRINTF("status register B: 0x%02x\n", retval); return retval; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,653
static uint32_t fdctrl_read_tape(FDCtrl *fdctrl) { uint32_t retval = fdctrl->tdr; FLOPPY_DPRINTF("tape drive register: 0x%02x\n", retval); return retval; }
DoS Exec Code Overflow
0
static uint32_t fdctrl_read_tape(FDCtrl *fdctrl) { uint32_t retval = fdctrl->tdr; FLOPPY_DPRINTF("tape drive register: 0x%02x\n", retval); return retval; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,654
static void fdctrl_reset(FDCtrl *fdctrl, int do_irq) { int i; FLOPPY_DPRINTF("reset controller\n"); fdctrl_reset_irq(fdctrl); /* Initialise controller */ fdctrl->sra = 0; fdctrl->srb = 0xc0; if (!fdctrl->drives[1].blk) { fdctrl->sra |= FD_SRA_nDRV2; } fdctrl->cur_drv = 0; ...
DoS Exec Code Overflow
0
static void fdctrl_reset(FDCtrl *fdctrl, int do_irq) { int i; FLOPPY_DPRINTF("reset controller\n"); fdctrl_reset_irq(fdctrl); /* Initialise controller */ fdctrl->sra = 0; fdctrl->srb = 0xc0; if (!fdctrl->drives[1].blk) { fdctrl->sra |= FD_SRA_nDRV2; } fdctrl->cur_drv = 0; ...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,655
static void fdctrl_reset_fifo(FDCtrl *fdctrl) { fdctrl->data_dir = FD_DIR_WRITE; fdctrl->data_pos = 0; fdctrl->msr &= ~(FD_MSR_CMDBUSY | FD_MSR_DIO); }
DoS Exec Code Overflow
0
static void fdctrl_reset_fifo(FDCtrl *fdctrl) { fdctrl->data_dir = FD_DIR_WRITE; fdctrl->data_pos = 0; fdctrl->msr &= ~(FD_MSR_CMDBUSY | FD_MSR_DIO); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,656
static int fdctrl_seek_to_next_sect(FDCtrl *fdctrl, FDrive *cur_drv) { FLOPPY_DPRINTF("seek to next sector (%d %02x %02x => %d)\n", cur_drv->head, cur_drv->track, cur_drv->sect, fd_sector(cur_drv)); /* XXX: cur_drv->sect >= cur_drv->last_sect should be an error in fa...
DoS Exec Code Overflow
0
static int fdctrl_seek_to_next_sect(FDCtrl *fdctrl, FDrive *cur_drv) { FLOPPY_DPRINTF("seek to next sector (%d %02x %02x => %d)\n", cur_drv->head, cur_drv->track, cur_drv->sect, fd_sector(cur_drv)); /* XXX: cur_drv->sect >= cur_drv->last_sect should be an error in fa...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,657
static void fdctrl_set_fifo(FDCtrl *fdctrl, int fifo_len) { fdctrl->data_dir = FD_DIR_READ; fdctrl->data_len = fifo_len; fdctrl->data_pos = 0; fdctrl->msr |= FD_MSR_CMDBUSY | FD_MSR_RQM | FD_MSR_DIO; }
DoS Exec Code Overflow
0
static void fdctrl_set_fifo(FDCtrl *fdctrl, int fifo_len) { fdctrl->data_dir = FD_DIR_READ; fdctrl->data_len = fifo_len; fdctrl->data_pos = 0; fdctrl->msr |= FD_MSR_CMDBUSY | FD_MSR_RQM | FD_MSR_DIO; }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,658
static void fdctrl_start_transfer(FDCtrl *fdctrl, int direction) { FDrive *cur_drv; uint8_t kh, kt, ks; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); kt = fdctrl->fifo[2]; kh = fdctrl->fifo[3]; ks = fdctrl->fifo[4]; FLOPPY_DPRINTF("Start transfer ...
DoS Exec Code Overflow
0
static void fdctrl_start_transfer(FDCtrl *fdctrl, int direction) { FDrive *cur_drv; uint8_t kh, kt, ks; SET_CUR_DRV(fdctrl, fdctrl->fifo[1] & FD_DOR_SELMASK); cur_drv = get_cur_drv(fdctrl); kt = fdctrl->fifo[2]; kh = fdctrl->fifo[3]; ks = fdctrl->fifo[4]; FLOPPY_DPRINTF("Start transfer ...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,659
static void fdctrl_start_transfer_del(FDCtrl *fdctrl, int direction) { qemu_log_mask(LOG_UNIMP, "fdctrl_start_transfer_del() unimplemented\n"); /* We don't handle deleted data, * so we don't return *ANYTHING* */ fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK, 0x00, 0x00); }
DoS Exec Code Overflow
0
static void fdctrl_start_transfer_del(FDCtrl *fdctrl, int direction) { qemu_log_mask(LOG_UNIMP, "fdctrl_start_transfer_del() unimplemented\n"); /* We don't handle deleted data, * so we don't return *ANYTHING* */ fdctrl_stop_transfer(fdctrl, FD_SR0_ABNTERM | FD_SR0_SEEK, 0x00, 0x00); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,660
static void fdctrl_stop_transfer(FDCtrl *fdctrl, uint8_t status0, uint8_t status1, uint8_t status2) { FDrive *cur_drv; cur_drv = get_cur_drv(fdctrl); fdctrl->status0 &= ~(FD_SR0_DS0 | FD_SR0_DS1 | FD_SR0_HEAD); fdctrl->status0 |= GET_CUR_DRV(fdctrl); if (cur_drv->he...
DoS Exec Code Overflow
0
static void fdctrl_stop_transfer(FDCtrl *fdctrl, uint8_t status0, uint8_t status1, uint8_t status2) { FDrive *cur_drv; cur_drv = get_cur_drv(fdctrl); fdctrl->status0 &= ~(FD_SR0_DS0 | FD_SR0_DS1 | FD_SR0_HEAD); fdctrl->status0 |= GET_CUR_DRV(fdctrl); if (cur_drv->he...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,661
static int fdctrl_transfer_handler (void *opaque, int nchan, int dma_pos, int dma_len) { FDCtrl *fdctrl; FDrive *cur_drv; int len, start_pos, rel_pos; uint8_t status0 = 0x00, status1 = 0x00, status2 = 0x00; fdctrl = opaque; if (fdctrl->msr & FD_MSR_RQM) { ...
DoS Exec Code Overflow
0
static int fdctrl_transfer_handler (void *opaque, int nchan, int dma_pos, int dma_len) { FDCtrl *fdctrl; FDrive *cur_drv; int len, start_pos, rel_pos; uint8_t status0 = 0x00, status1 = 0x00, status2 = 0x00; fdctrl = opaque; if (fdctrl->msr & FD_MSR_RQM) { ...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,662
static void fdctrl_unimplemented(FDCtrl *fdctrl, int direction) { qemu_log_mask(LOG_UNIMP, "fdc: unimplemented command 0x%02x\n", fdctrl->fifo[0]); fdctrl->fifo[0] = FD_SR0_INVCMD; fdctrl_set_fifo(fdctrl, 1); }
DoS Exec Code Overflow
0
static void fdctrl_unimplemented(FDCtrl *fdctrl, int direction) { qemu_log_mask(LOG_UNIMP, "fdc: unimplemented command 0x%02x\n", fdctrl->fifo[0]); fdctrl->fifo[0] = FD_SR0_INVCMD; fdctrl_set_fifo(fdctrl, 1); }
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,663
static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value) { FDCtrl *fdctrl = opaque; FLOPPY_DPRINTF("write reg%d: 0x%02x\n", reg & 7, value); reg &= 7; switch (reg) { case FD_REG_DOR: fdctrl_write_dor(fdctrl, value); break; case FD_REG_TDR: fdctrl_write_tape...
DoS Exec Code Overflow
0
static void fdctrl_write (void *opaque, uint32_t reg, uint32_t value) { FDCtrl *fdctrl = opaque; FLOPPY_DPRINTF("write reg%d: 0x%02x\n", reg & 7, value); reg &= 7; switch (reg) { case FD_REG_DOR: fdctrl_write_dor(fdctrl, value); break; case FD_REG_TDR: fdctrl_write_tape...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,664
static void fdctrl_write_ccr(FDCtrl *fdctrl, uint32_t value) { /* Reset mode */ if (!(fdctrl->dor & FD_DOR_nRESET)) { FLOPPY_DPRINTF("Floppy controller in RESET state !\n"); return; } FLOPPY_DPRINTF("configuration control register set to 0x%02x\n", value); /* Only the rate selection...
DoS Exec Code Overflow
0
static void fdctrl_write_ccr(FDCtrl *fdctrl, uint32_t value) { /* Reset mode */ if (!(fdctrl->dor & FD_DOR_nRESET)) { FLOPPY_DPRINTF("Floppy controller in RESET state !\n"); return; } FLOPPY_DPRINTF("configuration control register set to 0x%02x\n", value); /* Only the rate selection...
@@ -1497,7 +1497,7 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) { FDrive *cur_drv; uint32_t retval = 0; - int pos; + uint32_t pos; cur_drv = get_cur_drv(fdctrl); fdctrl->dsr &= ~FD_DSR_PWRDOWN; @@ -1506,8 +1506,8 @@ static uint32_t fdctrl_read_data(FDCtrl *fdctrl) return 0; ...
CWE-119
null
null
2,665
execfile_cleanup(i_ctx_t *i_ctx_p) { check_ostack(1); *++osp = esp[2]; return zclosefile(i_ctx_p); }
Bypass
0
execfile_cleanup(i_ctx_t *i_ctx_p) { check_ostack(1); *++osp = esp[2]; return zclosefile(i_ctx_p); }
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,666
execfile_finish(i_ctx_t *i_ctx_p) { check_ostack(1); esp -= 2; execfile_cleanup(i_ctx_p); return o_pop_estack; }
Bypass
0
execfile_finish(i_ctx_t *i_ctx_p) { check_ostack(1); esp -= 2; execfile_cleanup(i_ctx_p); return o_pop_estack; }
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,667
file_cleanup(i_ctx_t *i_ctx_p) { gx_io_device *iodev = r_ptr(esp + 2, gx_io_device); iodev->procs.enumerate_close(r_ptr(esp + 5, file_enum)); return 0; }
Bypass
0
file_cleanup(i_ctx_t *i_ctx_p) { gx_io_device *iodev = r_ptr(esp + 2, gx_io_device); iodev->procs.enumerate_close(r_ptr(esp + 5, file_enum)); return 0; }
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,668
file_continue(i_ctx_t *i_ctx_p) { os_ptr op = osp; es_ptr pscratch = esp - 2; file_enum *pfen = r_ptr(esp - 1, file_enum); int devlen = esp[-3].value.intval; gx_io_device *iodev = r_ptr(esp - 4, gx_io_device); uint len = r_size(pscratch); uint code; if (len < devlen) return_erro...
Bypass
0
file_continue(i_ctx_t *i_ctx_p) { os_ptr op = osp; es_ptr pscratch = esp - 2; file_enum *pfen = r_ptr(esp - 1, file_enum); int devlen = esp[-3].value.intval; gx_io_device *iodev = r_ptr(esp - 4, gx_io_device); uint len = r_size(pscratch); uint code; if (len < devlen) return_erro...
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,669
file_is_tempfile(i_ctx_t *i_ctx_p, const uchar *fname, int len) { ref *SAFETY; ref *tempfiles; ref kname; if (dict_find_string(systemdict, "SAFETY", &SAFETY) <= 0 || dict_find_string(SAFETY, "tempfiles", &tempfiles) <= 0) return false; if (name_ref(imemory, fname, len, &kname, -...
Bypass
0
file_is_tempfile(i_ctx_t *i_ctx_p, const uchar *fname, int len) { ref *SAFETY; ref *tempfiles; ref kname; if (dict_find_string(systemdict, "SAFETY", &SAFETY) <= 0 || dict_find_string(SAFETY, "tempfiles", &tempfiles) <= 0) return false; if (name_ref(imemory, fname, len, &kname, -...
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,670
prefix_is_simple(const char *pstr) { int i; char c; for (i = 0; (c = pstr[i]) != 0; i++) { if (!(c == '-' || c == '_' || (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))) return false; } return true; }
Bypass
0
prefix_is_simple(const char *pstr) { int i; char c; for (i = 0; (c = pstr[i]) != 0; i++) { if (!(c == '-' || c == '_' || (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'))) return false; } return true; }
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,671
z_check_file_permissions(gs_memory_t *mem, const char *fname, const int len, const char *permission) { i_ctx_t *i_ctx_p = get_minst_from_memory(mem)->i_ctx_p; gs_parsed_file_name_t pname; const char *permitgroup = permission[0] == 'r' ? "PermitFileReading" : "PermitFileWriting"; int code = gs_parse_file...
Bypass
0
z_check_file_permissions(gs_memory_t *mem, const char *fname, const int len, const char *permission) { i_ctx_t *i_ctx_p = get_minst_from_memory(mem)->i_ctx_p; gs_parsed_file_name_t pname; const char *permitgroup = permission[0] == 'r' ? "PermitFileReading" : "PermitFileWriting"; int code = gs_parse_file...
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,672
zfile(i_ctx_t *i_ctx_p) { os_ptr op = osp; char file_access[4]; gs_parsed_file_name_t pname; int code = parse_file_access_string(op, file_access); stream *s; if (code < 0) return code; code = parse_file_name(op-1, &pname, i_ctx_p->LockFilePermissions, imemory); if (code < 0) ...
Bypass
0
zfile(i_ctx_t *i_ctx_p) { os_ptr op = osp; char file_access[4]; gs_parsed_file_name_t pname; int code = parse_file_access_string(op, file_access); stream *s; if (code < 0) return code; code = parse_file_name(op-1, &pname, i_ctx_p->LockFilePermissions, imemory); if (code < 0) ...
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,673
zfilenameforall(i_ctx_t *i_ctx_p) { os_ptr op = osp; file_enum *pfen; gx_io_device *iodev = NULL; gs_parsed_file_name_t pname; int code = 0; check_write_type(*op, t_string); check_proc(op[-1]); check_read_type(op[-2], t_string); /* Push a mark, the iodev, devicenamelen, the scratch ...
Bypass
0
zfilenameforall(i_ctx_t *i_ctx_p) { os_ptr op = osp; file_enum *pfen; gx_io_device *iodev = NULL; gs_parsed_file_name_t pname; int code = 0; check_write_type(*op, t_string); check_proc(op[-1]); check_read_type(op[-2], t_string); /* Push a mark, the iodev, devicenamelen, the scratch ...
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,674
zfilenamelistseparator(i_ctx_t *i_ctx_p) { os_ptr op = osp; push(1); make_const_string(op, avm_foreign | a_readonly, 1, (const byte *)&gp_file_name_list_separator); return 0; }
Bypass
0
zfilenamelistseparator(i_ctx_t *i_ctx_p) { os_ptr op = osp; push(1); make_const_string(op, avm_foreign | a_readonly, 1, (const byte *)&gp_file_name_list_separator); return 0; }
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,675
zlibfile(i_ctx_t *i_ctx_p) { os_ptr op = osp; int code; byte cname[DEFAULT_BUFFER_SIZE]; uint clen; gs_parsed_file_name_t pname; stream *s; gx_io_device *iodev_dflt; check_ostack(2); code = parse_file_name(op, &pname, i_ctx_p->LockFilePermissions, imemory); if (code < 0) ...
Bypass
0
zlibfile(i_ctx_t *i_ctx_p) { os_ptr op = osp; int code; byte cname[DEFAULT_BUFFER_SIZE]; uint clen; gs_parsed_file_name_t pname; stream *s; gx_io_device *iodev_dflt; check_ostack(2); code = parse_file_name(op, &pname, i_ctx_p->LockFilePermissions, imemory); if (code < 0) ...
@@ -134,7 +134,7 @@ check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len, /* we're protecting arbitrary file system accesses, not Postscript device accesses. * Although, note that %pipe% is explicitly checked for and disallowed elsewhere */ - if (iodev != iodev_default(imemory...
null
null
null
2,676
int __drm_get_edid_firmware_path(char *buf, size_t bufsize) { return scnprintf(buf, bufsize, "%s", edid_firmware); }
DoS
0
int __drm_get_edid_firmware_path(char *buf, size_t bufsize) { return scnprintf(buf, bufsize, "%s", edid_firmware); }
@@ -293,6 +293,8 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector) * the last one found one as a fallback. */ fwstr = kstrdup(edid_firmware, GFP_KERNEL); + if (!fwstr) + return ERR_PTR(-ENOMEM); edidstr = fwstr; while ((edidname = strsep(&edidstr, ","))) {
CWE-476
null
null
2,677
int __drm_set_edid_firmware_path(const char *path) { scnprintf(edid_firmware, sizeof(edid_firmware), "%s", path); return 0; }
DoS
0
int __drm_set_edid_firmware_path(const char *path) { scnprintf(edid_firmware, sizeof(edid_firmware), "%s", path); return 0; }
@@ -293,6 +293,8 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector) * the last one found one as a fallback. */ fwstr = kstrdup(edid_firmware, GFP_KERNEL); + if (!fwstr) + return ERR_PTR(-ENOMEM); edidstr = fwstr; while ((edidname = strsep(&edidstr, ","))) {
CWE-476
null
null
2,678
static void *edid_load(struct drm_connector *connector, const char *name, const char *connector_name) { const struct firmware *fw = NULL; const u8 *fwdata; u8 *edid; int fwsize, builtin; int i, valid_extensions = 0; bool print_bad_edid = !connector->bad_edid_counter || (drm_debug & DRM_UT_KMS); builtin = mat...
DoS
0
static void *edid_load(struct drm_connector *connector, const char *name, const char *connector_name) { const struct firmware *fw = NULL; const u8 *fwdata; u8 *edid; int fwsize, builtin; int i, valid_extensions = 0; bool print_bad_edid = !connector->bad_edid_counter || (drm_debug & DRM_UT_KMS); builtin = mat...
@@ -293,6 +293,8 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector) * the last one found one as a fallback. */ fwstr = kstrdup(edid_firmware, GFP_KERNEL); + if (!fwstr) + return ERR_PTR(-ENOMEM); edidstr = fwstr; while ((edidname = strsep(&edidstr, ","))) {
CWE-476
null
null
2,679
static int edid_size(const u8 *edid, int data_size) { if (data_size < EDID_LENGTH) return 0; return (edid[0x7e] + 1) * EDID_LENGTH; }
DoS
0
static int edid_size(const u8 *edid, int data_size) { if (data_size < EDID_LENGTH) return 0; return (edid[0x7e] + 1) * EDID_LENGTH; }
@@ -293,6 +293,8 @@ struct edid *drm_load_edid_firmware(struct drm_connector *connector) * the last one found one as a fallback. */ fwstr = kstrdup(edid_firmware, GFP_KERNEL); + if (!fwstr) + return ERR_PTR(-ENOMEM); edidstr = fwstr; while ((edidname = strsep(&edidstr, ","))) {
CWE-476
null
null
2,680
void php_ap2_register_hook(apr_pool_t *p) { ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_config(php_apache_server_startup, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_handler(php_handler, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_child_init(php_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE);...
DoS Exec Code
0
void php_ap2_register_hook(apr_pool_t *p) { ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_post_config(php_apache_server_startup, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_handler(php_handler, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_child_init(php_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE);...
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,681
static int php_apache2_startup(sapi_module_struct *sapi_module) { if (php_module_startup(sapi_module, &php_apache_module, 1)==FAILURE) { return FAILURE; } return SUCCESS; }
DoS Exec Code
0
static int php_apache2_startup(sapi_module_struct *sapi_module) { if (php_module_startup(sapi_module, &php_apache_module, 1)==FAILURE) { return FAILURE; } return SUCCESS; }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,682
static void php_apache_add_version(apr_pool_t *p) { TSRMLS_FETCH(); if (PG(expose_php)) { ap_add_version_component(p, "PHP/" PHP_VERSION); } }
DoS Exec Code
0
static void php_apache_add_version(apr_pool_t *p) { TSRMLS_FETCH(); if (PG(expose_php)) { ap_add_version_component(p, "PHP/" PHP_VERSION); } }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,683
static apr_status_t php_apache_child_shutdown(void *tmp) { apache2_sapi_module.shutdown(&apache2_sapi_module); #if defined(ZTS) && !defined(PHP_WIN32) tsrm_shutdown(); #endif return APR_SUCCESS; }
DoS Exec Code
0
static apr_status_t php_apache_child_shutdown(void *tmp) { apache2_sapi_module.shutdown(&apache2_sapi_module); #if defined(ZTS) && !defined(PHP_WIN32) tsrm_shutdown(); #endif return APR_SUCCESS; }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,684
static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC) { if (strcmp(r->protocol, "INCLUDED")) { zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); } else { typedef struct { HashTable config; } php_conf_rec; char *str; uint str_len; php_conf_rec *c = ap_get_module_config(r->per_dir...
DoS Exec Code
0
static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC) { if (strcmp(r->protocol, "INCLUDED")) { zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); } else { typedef struct { HashTable config; } php_conf_rec; char *str; uint str_len; php_conf_rec *c = ap_get_module_config(r->per_dir...
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,685
static void php_apache_request_dtor(request_rec *r TSRMLS_DC) { php_request_shutdown(NULL); }
DoS Exec Code
0
static void php_apache_request_dtor(request_rec *r TSRMLS_DC) { php_request_shutdown(NULL); }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,686
php_apache_sapi_flush(void *server_context) { php_struct *ctx; request_rec *r; TSRMLS_FETCH(); ctx = server_context; /* If we haven't registered a server_context yet, * then don't bother flushing. */ if (!server_context) { return; } r = ctx->r; sapi_send_headers(TSRMLS_C); r->status = SG(sapi_headers...
DoS Exec Code
0
php_apache_sapi_flush(void *server_context) { php_struct *ctx; request_rec *r; TSRMLS_FETCH(); ctx = server_context; /* If we haven't registered a server_context yet, * then don't bother flushing. */ if (!server_context) { return; } r = ctx->r; sapi_send_headers(TSRMLS_C); r->status = SG(sapi_headers...
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,687
static double php_apache_sapi_get_request_time(TSRMLS_D) { php_struct *ctx = SG(server_context); return ((double) apr_time_as_msec(ctx->r->request_time)) / 1000.0; }
DoS Exec Code
0
static double php_apache_sapi_get_request_time(TSRMLS_D) { php_struct *ctx = SG(server_context); return ((double) apr_time_as_msec(ctx->r->request_time)) / 1000.0; }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,688
php_apache_sapi_get_stat(TSRMLS_D) { php_struct *ctx = SG(server_context); ctx->finfo.st_uid = ctx->r->finfo.user; ctx->finfo.st_gid = ctx->r->finfo.group; ctx->finfo.st_dev = ctx->r->finfo.device; ctx->finfo.st_ino = ctx->r->finfo.inode; #if defined(NETWARE) && defined(CLIB_STAT_PATCH) ctx->finfo.st_atime.tv_se...
DoS Exec Code
0
php_apache_sapi_get_stat(TSRMLS_D) { php_struct *ctx = SG(server_context); ctx->finfo.st_uid = ctx->r->finfo.user; ctx->finfo.st_gid = ctx->r->finfo.group; ctx->finfo.st_dev = ctx->r->finfo.device; ctx->finfo.st_ino = ctx->r->finfo.inode; #if defined(NETWARE) && defined(CLIB_STAT_PATCH) ctx->finfo.st_atime.tv_se...
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,689
php_apache_sapi_getenv(char *name, size_t name_len TSRMLS_DC) { php_struct *ctx = SG(server_context); const char *env_var; if (ctx == NULL) { return NULL; } env_var = apr_table_get(ctx->r->subprocess_env, name); return (char *) env_var; }
DoS Exec Code
0
php_apache_sapi_getenv(char *name, size_t name_len TSRMLS_DC) { php_struct *ctx = SG(server_context); const char *env_var; if (ctx == NULL) { return NULL; } env_var = apr_table_get(ctx->r->subprocess_env, name); return (char *) env_var; }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,690
php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) { php_struct *ctx; char *val, *ptr; ctx = SG(server_context); switch (op) { case SAPI_HEADER_DELETE: apr_table_unset(ctx->r->headers_out, sapi_header->header); return 0; ...
DoS Exec Code
0
php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers TSRMLS_DC) { php_struct *ctx; char *val, *ptr; ctx = SG(server_context); switch (op) { case SAPI_HEADER_DELETE: apr_table_unset(ctx->r->headers_out, sapi_header->header); return 0; ...
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,691
static void php_apache_sapi_log_message_ex(char *msg, request_rec *r TSRMLS_DC) { if (r) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename); } else { php_apache_sapi_log_message(msg TSRMLS_CC); } }
DoS Exec Code
0
static void php_apache_sapi_log_message_ex(char *msg, request_rec *r TSRMLS_DC) { if (r) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename); } else { php_apache_sapi_log_message(msg TSRMLS_CC); } }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,692
php_apache_sapi_read_cookies(TSRMLS_D) { php_struct *ctx = SG(server_context); const char *http_cookie; http_cookie = apr_table_get(ctx->r->headers_in, "cookie"); /* The SAPI interface should use 'const char *' */ return (char *) http_cookie; }
DoS Exec Code
0
php_apache_sapi_read_cookies(TSRMLS_D) { php_struct *ctx = SG(server_context); const char *http_cookie; http_cookie = apr_table_get(ctx->r->headers_in, "cookie"); /* The SAPI interface should use 'const char *' */ return (char *) http_cookie; }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,693
php_apache_sapi_read_post(char *buf, uint count_bytes TSRMLS_DC) { apr_size_t len, tlen=0; php_struct *ctx = SG(server_context); request_rec *r; apr_bucket_brigade *brigade; r = ctx->r; brigade = ctx->brigade; len = count_bytes; /* * This loop is needed because ap_get_brigade() can return us partial data ...
DoS Exec Code
0
php_apache_sapi_read_post(char *buf, uint count_bytes TSRMLS_DC) { apr_size_t len, tlen=0; php_struct *ctx = SG(server_context); request_rec *r; apr_bucket_brigade *brigade; r = ctx->r; brigade = ctx->brigade; len = count_bytes; /* * This loop is needed because ap_get_brigade() can return us partial data ...
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,694
php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC) { php_struct *ctx = SG(server_context); const apr_array_header_t *arr = apr_table_elts(ctx->r->subprocess_env); char *key, *val; int new_val_len; APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { val = ""; } if (sapi_module.input_filter...
DoS Exec Code
0
php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC) { php_struct *ctx = SG(server_context); const apr_array_header_t *arr = apr_table_elts(ctx->r->subprocess_env); char *key, *val; int new_val_len; APR_ARRAY_FOREACH_OPEN(arr, key, val) if (!val) { val = ""; } if (sapi_module.input_filter...
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,695
php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { php_struct *ctx = SG(server_context); const char *sline = SG(sapi_headers).http_status_line; ctx->r->status = SG(sapi_headers).http_response_code; /* httpd requires that r->status_line is set to the first digit of * the status-code: */ ...
DoS Exec Code
0
php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) { php_struct *ctx = SG(server_context); const char *sline = SG(sapi_headers).http_status_line; ctx->r->status = SG(sapi_headers).http_response_code; /* httpd requires that r->status_line is set to the first digit of * the status-code: */ ...
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,696
php_apache_sapi_ub_write(const char *str, uint str_length TSRMLS_DC) { request_rec *r; php_struct *ctx; ctx = SG(server_context); r = ctx->r; if (ap_rwrite(str, str_length, r) < 0) { php_handle_aborted_connection(); } return str_length; /* we always consume all the data passed to us. */ }
DoS Exec Code
0
php_apache_sapi_ub_write(const char *str, uint str_length TSRMLS_DC) { request_rec *r; php_struct *ctx; ctx = SG(server_context); r = ctx->r; if (ap_rwrite(str, str_length, r) < 0) { php_handle_aborted_connection(); } return str_length; /* we always consume all the data passed to us. */ }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,697
static apr_status_t php_apache_server_shutdown(void *tmp) { apache2_sapi_module.shutdown(&apache2_sapi_module); sapi_shutdown(); #ifdef ZTS tsrm_shutdown(); #endif return APR_SUCCESS; }
DoS Exec Code
0
static apr_status_t php_apache_server_shutdown(void *tmp) { apache2_sapi_module.shutdown(&apache2_sapi_module); sapi_shutdown(); #ifdef ZTS tsrm_shutdown(); #endif return APR_SUCCESS; }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,698
static int php_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) { #ifndef ZTS int threaded_mpm; ap_mpm_query(AP_MPMQ_IS_THREADED, &threaded_mpm); if(threaded_mpm) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, 0, "Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe....
DoS Exec Code
0
static int php_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) { #ifndef ZTS int threaded_mpm; ap_mpm_query(AP_MPMQ_IS_THREADED, &threaded_mpm); if(threaded_mpm) { ap_log_error(APLOG_MARK, APLOG_CRIT, 0, 0, "Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe....
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null
2,699
static apr_status_t php_server_context_cleanup(void *data_) { void **data = data_; *data = NULL; return APR_SUCCESS; }
DoS Exec Code
0
static apr_status_t php_server_context_cleanup(void *data_) { void **data = data_; *data = NULL; return APR_SUCCESS; }
@@ -688,6 +688,7 @@ zend_first_try { } zend_end_try(); } apr_brigade_cleanup(brigade); + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); } else { ctx->r = parent_req; }
CWE-20
null
null