idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
1,200 | seticc_cal(i_ctx_t * i_ctx_p, float *white, float *black, float *gamma,
float *matrix, int num_colorants, ulong dictkey)
{
int code;
gs_color_space * pcs;
gs_memory_t *mem = igs->memory;
int i;
cmm_profile_t *cal_profile... | Bypass | 0 | seticc_cal(i_ctx_t * i_ctx_p, float *white, float *black, float *gamma,
float *matrix, int num_colorants, ulong dictkey)
{
int code;
gs_color_space * pcs;
gs_memory_t *mem = igs->memory;
int i;
cmm_profile_t *cal_profile... | @@ -76,7 +76,7 @@ int seticc(i_ctx_t * i_ctx_p, int ncomps, ref *ICCdict, float *range_buff)
want to have this buffer. */
/* Check if we have the /Name entry. This is used to associate with
specs that have enumerated types to indicate sRGB sGray etc */
- if (dict_find_string(ICCdict, "Name", &... | CWE-704 | null | null |
1,201 | seticc_lab(i_ctx_t * i_ctx_p, float *white, float *black, float *range_buff)
{
int code;
gs_color_space * pcs;
int i;
/* build the color space object */
code = gs_cspace_build_ICC(&pcs, NULL, gs_gstate_memory(igs));
if (code < 0)
return gs_... | Bypass | 0 | seticc_lab(i_ctx_t * i_ctx_p, float *white, float *black, float *range_buff)
{
int code;
gs_color_space * pcs;
int i;
/* build the color space object */
code = gs_cspace_build_ICC(&pcs, NULL, gs_gstate_memory(igs));
if (code < 0)
return gs_... | @@ -76,7 +76,7 @@ int seticc(i_ctx_t * i_ctx_p, int ncomps, ref *ICCdict, float *range_buff)
want to have this buffer. */
/* Check if we have the /Name entry. This is used to associate with
specs that have enumerated types to indicate sRGB sGray etc */
- if (dict_find_string(ICCdict, "Name", &... | CWE-704 | null | null |
1,202 | push_callout(i_ctx_t *i_ctx_p, const char *callout_name)
{
int code;
check_estack(1);
code = name_enter_string(imemory, callout_name, esp + 1);
if (code < 0)
return code;
++esp;
r_set_attrs(esp, a_executable);
return o_push_estack;
}
| Bypass | 0 | push_callout(i_ctx_t *i_ctx_p, const char *callout_name)
{
int code;
check_estack(1);
code = name_enter_string(imemory, callout_name, esp + 1);
if (code < 0)
return code;
++esp;
r_set_attrs(esp, a_executable);
return o_push_estack;
}
| @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,203 | z2copy(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code = zcopy(i_ctx_p);
if (code >= 0)
return code;
if (!r_has_type(op, t_astruct))
return code;
return z2copy_gstate(i_ctx_p);
}
| Bypass | 0 | z2copy(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code = zcopy(i_ctx_p);
if (code >= 0)
return code;
if (!r_has_type(op, t_astruct))
return code;
return z2copy_gstate(i_ctx_p);
}
| @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,204 | z2currentgstate(i_ctx_t *i_ctx_p)
{
if (!save_page_device(igs))
return zcurrentgstate(i_ctx_p);
return push_callout(i_ctx_p, "%currentgstatepagedevice");
}
| Bypass | 0 | z2currentgstate(i_ctx_t *i_ctx_p)
{
if (!save_page_device(igs))
return zcurrentgstate(i_ctx_p);
return push_callout(i_ctx_p, "%currentgstatepagedevice");
}
| @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,205 | z2grestoreall(i_ctx_t *i_ctx_p)
{
for (;;) {
int code = restore_page_device(i_ctx_p, igs, gs_gstate_saved(igs));
if (code < 0) return code;
if (code == 0) {
bool done = !gs_gstate_saved(gs_gstate_saved(igs));
gs_grestore(igs);
if (done)
br... | Bypass | 0 | z2grestoreall(i_ctx_t *i_ctx_p)
{
for (;;) {
int code = restore_page_device(i_ctx_p, igs, gs_gstate_saved(igs));
if (code < 0) return code;
if (code == 0) {
bool done = !gs_gstate_saved(gs_gstate_saved(igs));
gs_grestore(igs);
if (done)
br... | @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,206 | z2gstate(i_ctx_t *i_ctx_p)
{
if (!save_page_device(igs))
return zgstate(i_ctx_p);
return push_callout(i_ctx_p, "%gstatepagedevice");
}
| Bypass | 0 | z2gstate(i_ctx_t *i_ctx_p)
{
if (!save_page_device(igs))
return zgstate(i_ctx_p);
return push_callout(i_ctx_p, "%gstatepagedevice");
}
| @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,207 | z2restore(i_ctx_t *i_ctx_p)
{
alloc_save_t *asave;
bool saveLockSafety = gs_currentdevice_inline(igs)->LockSafetyParams;
int code = restore_check_save(i_ctx_p, &asave);
if (code < 0) return code;
while (gs_gstate_saved(gs_gstate_saved(igs))) {
code = restore_page_device(i_ctx_p, igs, gs_gs... | Bypass | 0 | z2restore(i_ctx_t *i_ctx_p)
{
alloc_save_t *asave;
bool saveLockSafety = gs_currentdevice_inline(igs)->LockSafetyParams;
int code = restore_check_save(i_ctx_p, &asave);
if (code < 0) return code;
while (gs_gstate_saved(gs_gstate_saved(igs))) {
code = restore_page_device(i_ctx_p, igs, gs_gs... | @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,208 | z2save(i_ctx_t *i_ctx_p)
{
if (!save_page_device(igs))
return zsave(i_ctx_p);
return push_callout(i_ctx_p, "%savepagedevice");
}
| Bypass | 0 | z2save(i_ctx_t *i_ctx_p)
{
if (!save_page_device(igs))
return zsave(i_ctx_p);
return push_callout(i_ctx_p, "%savepagedevice");
}
| @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,209 | z2setgstate(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code;
check_stype(*op, st_igstate_obj);
code = restore_page_device(i_ctx_p, igs, igstate_ptr(op));
if (code < 0) return code;
if (code == 0)
return zsetgstate(i_ctx_p);
return push_callout(i_ctx_p, "%setgstatepagedevice");
}
| Bypass | 0 | z2setgstate(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code;
check_stype(*op, st_igstate_obj);
code = restore_page_device(i_ctx_p, igs, igstate_ptr(op));
if (code < 0) return code;
if (code == 0)
return zsetgstate(i_ctx_p);
return push_callout(i_ctx_p, "%setgstatepagedevice");
}
| @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,210 | zcallendpage(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev = gs_currentdevice(igs);
int code;
check_type(op[-1], t_integer);
check_type(*op, t_integer);
if ((dev = (*dev_proc(dev, get_page_device))(dev)) != 0) {
code = (*dev->page_procs.end_page)(dev, (int)op->value.intval, igs);
... | Bypass | 0 | zcallendpage(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev = gs_currentdevice(igs);
int code;
check_type(op[-1], t_integer);
check_type(*op, t_integer);
if ((dev = (*dev_proc(dev, get_page_device))(dev)) != 0) {
code = (*dev->page_procs.end_page)(dev, (int)op->value.intval, igs);
... | @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,211 | zcurrentshowpagecount(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev1, *dev = gs_currentdevice(igs);
if ((*dev_proc(dev, get_page_device))(dev) == 0) {
push(1);
make_false(op);
} else {
dev1 = (*dev_proc(dev, get_page_device))(dev);
push(2);
make_int(op - 1,... | Bypass | 0 | zcurrentshowpagecount(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev1, *dev = gs_currentdevice(igs);
if ((*dev_proc(dev, get_page_device))(dev) == 0) {
push(1);
make_false(op);
} else {
dev1 = (*dev_proc(dev, get_page_device))(dev);
push(2);
make_int(op - 1,... | @@ -277,7 +277,7 @@ restore_page_device(i_ctx_t *i_ctx_p, const gs_gstate * pgs_old, const gs_gstate
samepagedevice = false;
}
- if (LockSafetyParams && !samepagedevice) {
+ if (LockSafetyParams) {
const int required_ops = 512;
const int required_es = 32; | null | null | null |
1,212 | zcopydevice2(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *new_dev;
int code;
check_read_type(op[-1], t_device);
check_type(*op, t_boolean);
if (op[-1].value.pdevice == NULL)
/* This can happen if we invalidated devices on the stack by calling nulldevice after they were pushed */
... | null | 0 | zcopydevice2(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *new_dev;
int code;
check_read_type(op[-1], t_device);
check_type(*op, t_boolean);
if (op[-1].value.pdevice == NULL)
/* This can happen if we invalidated devices on the stack by calling nulldevice after they were pushed */
... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,213 | zcurrentdevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev = gs_currentdevice(igs);
gs_ref_memory_t *mem = (gs_ref_memory_t *) dev->memory;
push(1);
make_tav(op, t_device,
(mem == 0 ? avm_foreign : imemory_space(mem)) | a_all,
pdevice, dev);
return 0;
}
| null | 0 | zcurrentdevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev = gs_currentdevice(igs);
gs_ref_memory_t *mem = (gs_ref_memory_t *) dev->memory;
push(1);
make_tav(op, t_device,
(mem == 0 ? avm_foreign : imemory_space(mem)) | a_all,
pdevice, dev);
return 0;
}
| @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,214 | zcurrentoutputdevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *odev = NULL, *dev = gs_currentdevice(igs);
gs_ref_memory_t *mem = (gs_ref_memory_t *) dev->memory;
int code = dev_proc(dev, dev_spec_op)(dev,
gxdso_current_output_device, (void *)&odev, 0);
if (code < 0)
... | null | 0 | zcurrentoutputdevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *odev = NULL, *dev = gs_currentdevice(igs);
gs_ref_memory_t *mem = (gs_ref_memory_t *) dev->memory;
int code = dev_proc(dev, dev_spec_op)(dev,
gxdso_current_output_device, (void *)&odev, 0);
if (code < 0)
... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,215 | zdevicename(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
const char *dname;
check_read_type(*op, t_device);
if (op->value.pdevice == NULL)
/* This can happen if we invalidated devices on the stack by calling nulldevice after they were pushed */
return_error(gs_error_undefined);
dname = op-... | null | 0 | zdevicename(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
const char *dname;
check_read_type(*op, t_device);
if (op->value.pdevice == NULL)
/* This can happen if we invalidated devices on the stack by calling nulldevice after they were pushed */
return_error(gs_error_undefined);
dname = op-... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,216 | zdoneshowpage(i_ctx_t *i_ctx_p)
{
gx_device *dev = gs_currentdevice(igs);
gx_device *tdev = (*dev_proc(dev, get_page_device)) (dev);
if (tdev != 0)
tdev->ShowpageCount++;
return 0;
}
| null | 0 | zdoneshowpage(i_ctx_t *i_ctx_p)
{
gx_device *dev = gs_currentdevice(igs);
gx_device *tdev = (*dev_proc(dev, get_page_device)) (dev);
if (tdev != 0)
tdev->ShowpageCount++;
return 0;
}
| @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,217 | zget_device_params(i_ctx_t *i_ctx_p, bool is_hardware)
{
os_ptr op = osp;
ref rkeys;
gx_device *dev;
stack_param_list list;
int code;
ref *pmark;
check_read_type(op[-1], t_device);
if(!r_has_type(op, t_null)) {
check_type(*op, t_dictionary);
}
rkeys = *op;
dev = op[... | null | 0 | zget_device_params(i_ctx_t *i_ctx_p, bool is_hardware)
{
os_ptr op = osp;
ref rkeys;
gx_device *dev;
stack_param_list list;
int code;
ref *pmark;
check_read_type(op[-1], t_device);
if(!r_has_type(op, t_null)) {
check_type(*op, t_dictionary);
}
rkeys = *op;
dev = op[... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,218 | zgetbitsrect(i_ctx_t *i_ctx_p)
{ /*
* alpha? is 0 for no alpha, -1 for alpha first, 1 for alpha last.
* std_depth is null for native pixels, depth/component for
* standard color space.
*/
os_ptr op = osp;
gx_device *dev;
gs_int_rect rect;
gs_get_bits_params_t params;
... | null | 0 | zgetbitsrect(i_ctx_t *i_ctx_p)
{ /*
* alpha? is 0 for no alpha, -1 for alpha first, 1 for alpha last.
* std_depth is null for native pixels, depth/component for
* standard color space.
*/
os_ptr op = osp;
gx_device *dev;
gs_int_rect rect;
gs_get_bits_params_t params;
... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,219 | zgetdefaultdevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
const gx_device *dev;
dev = gs_getdefaultlibdevice(imemory);
if (dev == 0) /* couldn't find a default device */
return_error(gs_error_unknownerror);
push(1);
make_tav(op, t_device, avm_foreign | a_readonly, pdevice,
... | null | 0 | zgetdefaultdevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
const gx_device *dev;
dev = gs_getdefaultlibdevice(imemory);
if (dev == 0) /* couldn't find a default device */
return_error(gs_error_unknownerror);
push(1);
make_tav(op, t_device, avm_foreign | a_readonly, pdevice,
... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,220 | zgetdevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
const gx_device *dev;
check_type(*op, t_integer);
if (op->value.intval != (int)(op->value.intval))
return_error(gs_error_rangecheck); /* won't fit in an int */
dev = gs_getdevice((int)(op->value.intval));
if (dev == 0) /* index out of ran... | null | 0 | zgetdevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
const gx_device *dev;
check_type(*op, t_integer);
if (op->value.intval != (int)(op->value.intval))
return_error(gs_error_rangecheck); /* won't fit in an int */
dev = gs_getdevice((int)(op->value.intval));
if (dev == 0) /* index out of ran... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,221 | zgetdeviceparams(i_ctx_t *i_ctx_p)
{
return zget_device_params(i_ctx_p, false);
}
| null | 0 | zgetdeviceparams(i_ctx_t *i_ctx_p)
{
return zget_device_params(i_ctx_p, false);
}
| @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,222 | zmakewordimagedevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
os_ptr op1 = op - 1;
gs_matrix imat;
gx_device *new_dev;
const byte *colors;
int colors_size;
int code;
check_int_leu(op[-3], max_uint >> 1); /* width */
check_int_leu(op[-2], max_uint >> 1); /* height */
check_type(*op, ... | null | 0 | zmakewordimagedevice(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
os_ptr op1 = op - 1;
gs_matrix imat;
gx_device *new_dev;
const byte *colors;
int colors_size;
int code;
check_int_leu(op[-3], max_uint >> 1); /* width */
check_int_leu(op[-2], max_uint >> 1); /* height */
check_type(*op, ... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,223 | znulldevice(i_ctx_t *i_ctx_p)
{
int code = gs_nulldevice(igs);
invalidate_stack_devices(i_ctx_p);
clear_pagedevice(istate);
return code;
}
| null | 0 | znulldevice(i_ctx_t *i_ctx_p)
{
int code = gs_nulldevice(igs);
invalidate_stack_devices(i_ctx_p);
clear_pagedevice(istate);
return code;
}
| @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,224 | zoutputpage(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code;
check_type(op[-1], t_integer);
check_type(*op, t_boolean);
if (gs_debug[':']) {
gs_main_instance *minst = get_minst_from_memory((gs_memory_t *)i_ctx_p->memory.current->non_gc_memory);
print_resource_usage(minst, &(i_ctx_p->... | null | 0 | zoutputpage(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code;
check_type(op[-1], t_integer);
check_type(*op, t_boolean);
if (gs_debug[':']) {
gs_main_instance *minst = get_minst_from_memory((gs_memory_t *)i_ctx_p->memory.current->non_gc_memory);
print_resource_usage(minst, &(i_ctx_p->... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,225 | zputdeviceparams(i_ctx_t *i_ctx_p)
{
uint count = ref_stack_counttomark(&o_stack);
ref *prequire_all;
ref *ppolicy;
ref *pdev;
gx_device *dev;
stack_param_list list;
int code;
int old_width, old_height;
int i, dest;
if (count == 0)
return_error(gs_error_unmatchedmark);
... | null | 0 | zputdeviceparams(i_ctx_t *i_ctx_p)
{
uint count = ref_stack_counttomark(&o_stack);
ref *prequire_all;
ref *ppolicy;
ref *pdev;
gx_device *dev;
stack_param_list list;
int code;
int old_width, old_height;
int i, dest;
if (count == 0)
return_error(gs_error_unmatchedmark);
... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,226 | zspec_op(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev = gs_currentdevice(igs);
int i, nprocs = sizeof(spec_op_defs) / sizeof(spec_op_t), code, proc = -1;
ref opname, nref, namestr;
char *data;
/* At the very minimum we need a name object telling us which sepc_op to perform */
check_... | null | 0 | zspec_op(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
gx_device *dev = gs_currentdevice(igs);
int i, nprocs = sizeof(spec_op_defs) / sizeof(spec_op_t), code, proc = -1;
ref opname, nref, namestr;
char *data;
/* At the very minimum we need a name object telling us which sepc_op to perform */
check_... | @@ -508,13 +508,17 @@ zputdeviceparams(i_ctx_t *i_ctx_p)
int
zsetdevice(i_ctx_t *i_ctx_p)
{
- gx_device *dev = gs_currentdevice(igs);
+ gx_device *odev = NULL, *dev = gs_currentdevice(igs);
os_ptr op = osp;
- int code = 0;
+ int code = dev_proc(dev, dev_spec_op)(dev,
+ gxdso_c... | null | null | null |
1,227 | aspath_add_asns (struct aspath *aspath, as_t asno, u_char type, unsigned num)
{
struct assegment *assegment = aspath->segments;
unsigned i;
if (assegment && assegment->type == type)
{
/* extend existing segment */
aspath->segments = assegment_prepend_asns (aspath->segments, asno, num);
}
el... | DoS | 0 | aspath_add_asns (struct aspath *aspath, as_t asno, u_char type, unsigned num)
{
struct assegment *assegment = aspath->segments;
unsigned i;
if (assegment && assegment->type == type)
{
/* extend existing segment */
aspath->segments = assegment_prepend_asns (aspath->segments, asno, num);
}
el... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,228 | aspath_add_confed_seq (struct aspath *aspath, as_t asno)
{
return aspath_add_asns (aspath, asno, AS_CONFED_SEQUENCE, 1);
}
| DoS | 0 | aspath_add_confed_seq (struct aspath *aspath, as_t asno)
{
return aspath_add_asns (aspath, asno, AS_CONFED_SEQUENCE, 1);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,229 | aspath_add_seq (struct aspath *aspath, as_t asno)
{
return aspath_add_asns (aspath, asno, AS_SEQUENCE, 1);
}
| DoS | 0 | aspath_add_seq (struct aspath *aspath, as_t asno)
{
return aspath_add_asns (aspath, asno, AS_SEQUENCE, 1);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,230 | aspath_add_seq_n (struct aspath *aspath, as_t asno, unsigned num)
{
return aspath_add_asns (aspath, asno, AS_SEQUENCE, num);
}
| DoS | 0 | aspath_add_seq_n (struct aspath *aspath, as_t asno, unsigned num)
{
return aspath_add_asns (aspath, asno, AS_SEQUENCE, num);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,231 | aspath_aggregate (struct aspath *as1, struct aspath *as2)
{
int i;
int minlen;
int match;
int from;
struct assegment *seg1 = as1->segments;
struct assegment *seg2 = as2->segments;
struct aspath *aspath = NULL;
struct assegment *asset;
struct assegment *prevseg = NULL;
match = 0;
minlen = 0;
asp... | DoS | 0 | aspath_aggregate (struct aspath *as1, struct aspath *as2)
{
int i;
int minlen;
int match;
int from;
struct assegment *seg1 = as1->segments;
struct assegment *seg2 = as2->segments;
struct aspath *aspath = NULL;
struct assegment *asset;
struct assegment *prevseg = NULL;
match = 0;
minlen = 0;
asp... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,232 | aspath_aggregate_as_set_add (struct aspath *aspath, struct assegment *asset,
as_t as)
{
int i;
/* If this is first AS set member, create new as-set segment. */
if (asset == NULL)
{
asset = assegment_new (AS_SET, 1);
if (! aspath->segments)
aspath->segments = asset;
else
{
... | DoS | 0 | aspath_aggregate_as_set_add (struct aspath *aspath, struct assegment *asset,
as_t as)
{
int i;
/* If this is first AS set member, create new as-set segment. */
if (asset == NULL)
{
asset = assegment_new (AS_SET, 1);
if (! aspath->segments)
aspath->segments = asset;
else
{
... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,233 | aspath_aggregate_mpath (struct aspath *as1, struct aspath *as2)
{
int i;
int minlen;
int match;
int from1,from2;
struct assegment *seg1 = as1->segments;
struct assegment *seg2 = as2->segments;
struct aspath *aspath = NULL;
struct assegment *asset;
struct assegment *prevseg = NULL;
match = 0;
minl... | DoS | 0 | aspath_aggregate_mpath (struct aspath *as1, struct aspath *as2)
{
int i;
int minlen;
int match;
int from1,from2;
struct assegment *seg1 = as1->segments;
struct assegment *seg2 = as2->segments;
struct aspath *aspath = NULL;
struct assegment *asset;
struct assegment *prevseg = NULL;
match = 0;
minl... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,234 | aspath_as_add (struct aspath *as, as_t asno)
{
struct assegment *seg = as->segments;
if (!seg)
return;
/* Last segment search procedure. */
while (seg->next)
seg = seg->next;
assegment_append_asns (seg, &asno, 1);
}
| DoS | 0 | aspath_as_add (struct aspath *as, as_t asno)
{
struct assegment *seg = as->segments;
if (!seg)
return;
/* Last segment search procedure. */
while (seg->next)
seg = seg->next;
assegment_append_asns (seg, &asno, 1);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,235 | aspath_cmp (const void *arg1, const void *arg2)
{
const struct assegment *seg1 = ((const struct aspath *)arg1)->segments;
const struct assegment *seg2 = ((const struct aspath *)arg2)->segments;
while (seg1 || seg2)
{
int i;
if ((!seg1 && seg2) || (seg1 && !seg2))
return 0;
if (seg1->type... | DoS | 0 | aspath_cmp (const void *arg1, const void *arg2)
{
const struct assegment *seg1 = ((const struct aspath *)arg1)->segments;
const struct assegment *seg2 = ((const struct aspath *)arg2)->segments;
while (seg1 || seg2)
{
int i;
if ((!seg1 && seg2) || (seg1 && !seg2))
return 0;
if (seg1->type... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,236 | aspath_cmp_left (const struct aspath *aspath1, const struct aspath *aspath2)
{
const struct assegment *seg1;
const struct assegment *seg2;
if (!(aspath1 && aspath2))
return 0;
seg1 = aspath1->segments;
seg2 = aspath2->segments;
/* If both paths are originated in this AS then we do want to compare MED... | DoS | 0 | aspath_cmp_left (const struct aspath *aspath1, const struct aspath *aspath2)
{
const struct assegment *seg1;
const struct assegment *seg2;
if (!(aspath1 && aspath2))
return 0;
seg1 = aspath1->segments;
seg2 = aspath2->segments;
/* If both paths are originated in this AS then we do want to compare MED... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,237 | aspath_cmp_left_confed (const struct aspath *aspath1, const struct aspath *aspath2)
{
if (! (aspath1 && aspath2) )
return 0;
if ( !(aspath1->segments && aspath2->segments) )
return 0;
if ( (aspath1->segments->type != AS_CONFED_SEQUENCE)
|| (aspath2->segments->type != AS_CONFED_SEQUENCE) )
... | DoS | 0 | aspath_cmp_left_confed (const struct aspath *aspath1, const struct aspath *aspath2)
{
if (! (aspath1 && aspath2) )
return 0;
if ( !(aspath1->segments && aspath2->segments) )
return 0;
if ( (aspath1->segments->type != AS_CONFED_SEQUENCE)
|| (aspath2->segments->type != AS_CONFED_SEQUENCE) )
... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,238 | aspath_confed_check (struct aspath *aspath)
{
struct assegment *seg;
if ( !(aspath && aspath->segments) )
return 0;
seg = aspath->segments;
while (seg)
{
if (seg->type == AS_CONFED_SET || seg->type == AS_CONFED_SEQUENCE)
return 1;
seg = seg->next;
}
return 0;
}
| DoS | 0 | aspath_confed_check (struct aspath *aspath)
{
struct assegment *seg;
if ( !(aspath && aspath->segments) )
return 0;
seg = aspath->segments;
while (seg)
{
if (seg->type == AS_CONFED_SET || seg->type == AS_CONFED_SEQUENCE)
return 1;
seg = seg->next;
}
return 0;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,239 | aspath_count_confeds (struct aspath *aspath)
{
int count = 0;
struct assegment *seg = aspath->segments;
while (seg)
{
if (seg->type == AS_CONFED_SEQUENCE)
count += seg->length;
else if (seg->type == AS_CONFED_SET)
count++;
seg = seg->next;
}
return count;
}
| DoS | 0 | aspath_count_confeds (struct aspath *aspath)
{
int count = 0;
struct assegment *seg = aspath->segments;
while (seg)
{
if (seg->type == AS_CONFED_SEQUENCE)
count += seg->length;
else if (seg->type == AS_CONFED_SET)
count++;
seg = seg->next;
}
return count;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,240 | aspath_count_hops (const struct aspath *aspath)
{
int count = 0;
struct assegment *seg = aspath->segments;
while (seg)
{
if (seg->type == AS_SEQUENCE)
count += seg->length;
else if (seg->type == AS_SET)
count++;
seg = seg->next;
}
return count;
}
| DoS | 0 | aspath_count_hops (const struct aspath *aspath)
{
int count = 0;
struct assegment *seg = aspath->segments;
while (seg)
{
if (seg->type == AS_SEQUENCE)
count += seg->length;
else if (seg->type == AS_SET)
count++;
seg = seg->next;
}
return count;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,241 | aspath_delete_confed_seq (struct aspath *aspath)
{
struct assegment *seg;
if (!(aspath && aspath->segments))
return aspath;
seg = aspath->segments;
/* "if the first path segment of the AS_PATH is
* of type AS_CONFED_SEQUENCE,"
*/
if (aspath->segments->type != AS_CONFED_SEQUENCE)
return as... | DoS | 0 | aspath_delete_confed_seq (struct aspath *aspath)
{
struct assegment *seg;
if (!(aspath && aspath->segments))
return aspath;
seg = aspath->segments;
/* "if the first path segment of the AS_PATH is
* of type AS_CONFED_SEQUENCE,"
*/
if (aspath->segments->type != AS_CONFED_SEQUENCE)
return as... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,242 | aspath_delimiter_char (u_char type, u_char which)
{
int i;
struct
{
int type;
char start;
char end;
} aspath_delim_char [] =
{
{ AS_SET, '{', '}' },
{ AS_CONFED_SET, '[', ']' },
{ AS_CONFED_SEQUENCE, '(', ')' },
{ 0 }
};
for (i = 0; aspath_delim_ch... | DoS | 0 | aspath_delimiter_char (u_char type, u_char which)
{
int i;
struct
{
int type;
char start;
char end;
} aspath_delim_char [] =
{
{ AS_SET, '{', '}' },
{ AS_CONFED_SET, '[', ']' },
{ AS_CONFED_SEQUENCE, '(', ')' },
{ 0 }
};
for (i = 0; aspath_delim_ch... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,243 | aspath_empty (void)
{
return aspath_parse (NULL, 0, 1); /* 32Bit ;-) */
}
| DoS | 0 | aspath_empty (void)
{
return aspath_parse (NULL, 0, 1); /* 32Bit ;-) */
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,244 | aspath_empty_get (void)
{
struct aspath *aspath;
aspath = aspath_new ();
aspath_make_str_count (aspath);
return aspath;
}
| DoS | 0 | aspath_empty_get (void)
{
struct aspath *aspath;
aspath = aspath_new ();
aspath_make_str_count (aspath);
return aspath;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,245 | aspath_filter_exclude (struct aspath * source, struct aspath * exclude_list)
{
struct assegment * srcseg, * exclseg, * lastseg;
struct aspath * newpath;
newpath = aspath_new();
lastseg = NULL;
for (srcseg = source->segments; srcseg; srcseg = srcseg->next)
{
unsigned i, y, newlen = 0, done = 0, skip_as... | DoS | 0 | aspath_filter_exclude (struct aspath * source, struct aspath * exclude_list)
{
struct assegment * srcseg, * exclseg, * lastseg;
struct aspath * newpath;
newpath = aspath_new();
lastseg = NULL;
for (srcseg = source->segments; srcseg; srcseg = srcseg->next)
{
unsigned i, y, newlen = 0, done = 0, skip_as... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,246 | aspath_finish (void)
{
hash_clean (ashash, (void (*)(void *))aspath_free);
hash_free (ashash);
ashash = NULL;
if (snmp_stream)
stream_free (snmp_stream);
}
| DoS | 0 | aspath_finish (void)
{
hash_clean (ashash, (void (*)(void *))aspath_free);
hash_free (ashash);
ashash = NULL;
if (snmp_stream)
stream_free (snmp_stream);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,247 | aspath_firstas_check (struct aspath *aspath, as_t asno)
{
if ( (aspath == NULL) || (aspath->segments == NULL) )
return 0;
if (aspath->segments
&& (aspath->segments->type == AS_SEQUENCE)
&& (aspath->segments->as[0] == asno ))
return 1;
return 0;
}
| DoS | 0 | aspath_firstas_check (struct aspath *aspath, as_t asno)
{
if ( (aspath == NULL) || (aspath->segments == NULL) )
return 0;
if (aspath->segments
&& (aspath->segments->type == AS_SEQUENCE)
&& (aspath->segments->as[0] == asno ))
return 1;
return 0;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,248 | aspath_free (struct aspath *aspath)
{
if (!aspath)
return;
if (aspath->segments)
assegment_free_all (aspath->segments);
if (aspath->str)
XFREE (MTYPE_AS_STR, aspath->str);
XFREE (MTYPE_AS_PATH, aspath);
}
| DoS | 0 | aspath_free (struct aspath *aspath)
{
if (!aspath)
return;
if (aspath->segments)
assegment_free_all (aspath->segments);
if (aspath->str)
XFREE (MTYPE_AS_STR, aspath->str);
XFREE (MTYPE_AS_PATH, aspath);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,249 | aspath_gettoken (const char *buf, enum as_token *token, u_long *asno)
{
const char *p = buf;
/* Skip seperators (space for sequences, ',' for sets). */
while (isspace ((int) *p) || *p == ',')
p++;
/* Check the end of the string and type specify characters
(e.g. {}()). */
switch (*p)
{
case ... | DoS | 0 | aspath_gettoken (const char *buf, enum as_token *token, u_long *asno)
{
const char *p = buf;
/* Skip seperators (space for sequences, ',' for sets). */
while (isspace ((int) *p) || *p == ',')
p++;
/* Check the end of the string and type specify characters
(e.g. {}()). */
switch (*p)
{
case ... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,250 | aspath_has_as4 (struct aspath *aspath)
{
struct assegment *seg = aspath->segments;
unsigned int i;
while (seg)
{
for (i = 0; i < seg->length; i++)
if (seg->as[i] > BGP_AS_MAX)
return 1;
seg = seg->next;
}
return 0;
}
| DoS | 0 | aspath_has_as4 (struct aspath *aspath)
{
struct assegment *seg = aspath->segments;
unsigned int i;
while (seg)
{
for (i = 0; i < seg->length; i++)
if (seg->as[i] > BGP_AS_MAX)
return 1;
seg = seg->next;
}
return 0;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,251 | aspath_hash_alloc (void *arg)
{
const struct aspath *aspath = arg;
struct aspath *new;
/* Malformed AS path value. */
assert (aspath->str);
if (! aspath->str)
return NULL;
/* New aspath structure is needed. */
new = XMALLOC (MTYPE_AS_PATH, sizeof (struct aspath));
/* Reuse segments and string rep... | DoS | 0 | aspath_hash_alloc (void *arg)
{
const struct aspath *aspath = arg;
struct aspath *new;
/* Malformed AS path value. */
assert (aspath->str);
if (! aspath->str)
return NULL;
/* New aspath structure is needed. */
new = XMALLOC (MTYPE_AS_PATH, sizeof (struct aspath));
/* Reuse segments and string rep... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,252 | aspath_highest (struct aspath *aspath)
{
struct assegment *seg = aspath->segments;
as_t highest = 0;
unsigned int i;
while (seg)
{
for (i = 0; i < seg->length; i++)
if (seg->as[i] > highest
&& !BGP_AS_IS_PRIVATE(seg->as[i]))
highest = seg->as[i];
seg = seg->next;
}... | DoS | 0 | aspath_highest (struct aspath *aspath)
{
struct assegment *seg = aspath->segments;
as_t highest = 0;
unsigned int i;
while (seg)
{
for (i = 0; i < seg->length; i++)
if (seg->as[i] > highest
&& !BGP_AS_IS_PRIVATE(seg->as[i]))
highest = seg->as[i];
seg = seg->next;
}... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,253 | aspath_intern (struct aspath *aspath)
{
struct aspath *find;
/* Assert this AS path structure is not interned and has the string
representation built. */
assert (aspath->refcnt == 0);
assert (aspath->str);
/* Check AS path hash. */
find = hash_get (ashash, aspath, hash_alloc_intern);
if (find != as... | DoS | 0 | aspath_intern (struct aspath *aspath)
{
struct aspath *find;
/* Assert this AS path structure is not interned and has the string
representation built. */
assert (aspath->refcnt == 0);
assert (aspath->str);
/* Check AS path hash. */
find = hash_get (ashash, aspath, hash_alloc_intern);
if (find != as... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,254 | aspath_key_make (void *p)
{
struct aspath *aspath = (struct aspath *) p;
unsigned int key = 0;
if (!aspath->str)
aspath_str_update (aspath);
key = jhash (aspath->str, aspath->str_len, 2334325);
return key;
}
| DoS | 0 | aspath_key_make (void *p)
{
struct aspath *aspath = (struct aspath *) p;
unsigned int key = 0;
if (!aspath->str)
aspath_str_update (aspath);
key = jhash (aspath->str, aspath->str_len, 2334325);
return key;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,255 | aspath_left_confed_check (struct aspath *aspath)
{
if ( !(aspath && aspath->segments) )
return 0;
if ( (aspath->segments->type == AS_CONFED_SEQUENCE)
|| (aspath->segments->type == AS_CONFED_SET) )
return 1;
return 0;
}
| DoS | 0 | aspath_left_confed_check (struct aspath *aspath)
{
if ( !(aspath && aspath->segments) )
return 0;
if ( (aspath->segments->type == AS_CONFED_SEQUENCE)
|| (aspath->segments->type == AS_CONFED_SET) )
return 1;
return 0;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,256 | aspath_leftmost (struct aspath *aspath)
{
struct assegment *seg = aspath->segments;
as_t leftmost = 0;
if (seg && seg->length && seg->type == AS_SEQUENCE)
leftmost = seg->as[0];
return leftmost;
}
| DoS | 0 | aspath_leftmost (struct aspath *aspath)
{
struct assegment *seg = aspath->segments;
as_t leftmost = 0;
if (seg && seg->length && seg->type == AS_SEQUENCE)
leftmost = seg->as[0];
return leftmost;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,257 | aspath_loop_check (struct aspath *aspath, as_t asno)
{
struct assegment *seg;
int count = 0;
if ( (aspath == NULL) || (aspath->segments == NULL) )
return 0;
seg = aspath->segments;
while (seg)
{
int i;
for (i = 0; i < seg->length; i++)
if (seg->as[i] == asno)
count++;
... | DoS | 0 | aspath_loop_check (struct aspath *aspath, as_t asno)
{
struct assegment *seg;
int count = 0;
if ( (aspath == NULL) || (aspath->segments == NULL) )
return 0;
seg = aspath->segments;
while (seg)
{
int i;
for (i = 0; i < seg->length; i++)
if (seg->as[i] == asno)
count++;
... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,258 | aspath_make_str_count (struct aspath *as)
{
struct assegment *seg;
int str_size;
int len = 0;
char *str_buf;
/* Empty aspath. */
if (!as->segments)
{
as->str = XMALLOC (MTYPE_AS_STR, 1);
as->str[0] = '\0';
as->str_len = 0;
return;
}
seg = as->segments;
/* ASN takes... | DoS | 0 | aspath_make_str_count (struct aspath *as)
{
struct assegment *seg;
int str_size;
int len = 0;
char *str_buf;
/* Empty aspath. */
if (!as->segments)
{
as->str = XMALLOC (MTYPE_AS_STR, 1);
as->str[0] = '\0';
as->str_len = 0;
return;
}
seg = as->segments;
/* ASN takes... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,259 | aspath_merge (struct aspath *as1, struct aspath *as2)
{
struct assegment *last, *new;
if (! as1 || ! as2)
return NULL;
last = new = assegment_dup_all (as1->segments);
/* find the last valid segment */
while (last && last->next)
last = last->next;
last->next = as2->segments;
as2->segments =... | DoS | 0 | aspath_merge (struct aspath *as1, struct aspath *as2)
{
struct assegment *last, *new;
if (! as1 || ! as2)
return NULL;
last = new = assegment_dup_all (as1->segments);
/* find the last valid segment */
while (last && last->next)
last = last->next;
last->next = as2->segments;
as2->segments =... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,260 | aspath_new (void)
{
return XCALLOC (MTYPE_AS_PATH, sizeof (struct aspath));
}
| DoS | 0 | aspath_new (void)
{
return XCALLOC (MTYPE_AS_PATH, sizeof (struct aspath));
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,261 | aspath_parse (struct stream *s, size_t length, int use32bit)
{
struct aspath as;
struct aspath *find;
/* If length is odd it's malformed AS path. */
/* Nit-picking: if (use32bit == 0) it is malformed if odd,
* otherwise its malformed when length is larger than 2 and (length-2)
* is not dividable by 4.
... | DoS | 0 | aspath_parse (struct stream *s, size_t length, int use32bit)
{
struct aspath as;
struct aspath *find;
/* If length is odd it's malformed AS path. */
/* Nit-picking: if (use32bit == 0) it is malformed if odd,
* otherwise its malformed when length is larger than 2 and (length-2)
* is not dividable by 4.
... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,262 | aspath_prepend (struct aspath *as1, struct aspath *as2)
{
struct assegment *seg1;
struct assegment *seg2;
if (! as1 || ! as2)
return NULL;
seg1 = as1->segments;
seg2 = as2->segments;
/* If as2 is empty, only need to dupe as1's chain onto as2 */
if (seg2 == NULL)
{
as2->segments = asse... | DoS | 0 | aspath_prepend (struct aspath *as1, struct aspath *as2)
{
struct assegment *seg1;
struct assegment *seg2;
if (! as1 || ! as2)
return NULL;
seg1 = as1->segments;
seg2 = as2->segments;
/* If as2 is empty, only need to dupe as1's chain onto as2 */
if (seg2 == NULL)
{
as2->segments = asse... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,263 | aspath_print (struct aspath *as)
{
return (as ? as->str : NULL);
}
| DoS | 0 | aspath_print (struct aspath *as)
{
return (as ? as->str : NULL);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,264 | aspath_print_all_vty (struct vty *vty)
{
hash_iterate (ashash,
(void (*) (struct hash_backet *, void *))
aspath_show_all_iterator,
vty);
}
| DoS | 0 | aspath_print_all_vty (struct vty *vty)
{
hash_iterate (ashash,
(void (*) (struct hash_backet *, void *))
aspath_show_all_iterator,
vty);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,265 | aspath_print_vty (struct vty *vty, const char *format, struct aspath *as, const char * suffix)
{
assert (format);
vty_out (vty, format, as->str);
if (as->str_len && strlen (suffix))
vty_out (vty, "%s", suffix);
}
| DoS | 0 | aspath_print_vty (struct vty *vty, const char *format, struct aspath *as, const char * suffix)
{
assert (format);
vty_out (vty, format, as->str);
if (as->str_len && strlen (suffix))
vty_out (vty, "%s", suffix);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,266 | aspath_private_as_check (struct aspath *aspath)
{
struct assegment *seg;
if ( !(aspath && aspath->segments) )
return 0;
seg = aspath->segments;
while (seg)
{
int i;
for (i = 0; i < seg->length; i++)
{
if (!BGP_AS_IS_PRIVATE(seg->as[i]))
return 0;
}
seg = seg->... | DoS | 0 | aspath_private_as_check (struct aspath *aspath)
{
struct assegment *seg;
if ( !(aspath && aspath->segments) )
return 0;
seg = aspath->segments;
while (seg)
{
int i;
for (i = 0; i < seg->length; i++)
{
if (!BGP_AS_IS_PRIVATE(seg->as[i]))
return 0;
}
seg = seg->... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,267 | aspath_reconcile_as4 ( struct aspath *aspath, struct aspath *as4path)
{
struct assegment *seg, *newseg, *prevseg = NULL;
struct aspath *newpath = NULL, *mergedpath;
int hops, cpasns = 0;
if (!aspath)
return NULL;
seg = aspath->segments;
/* CONFEDs should get reconciled too.. */
hops = (aspath... | DoS | 0 | aspath_reconcile_as4 ( struct aspath *aspath, struct aspath *as4path)
{
struct assegment *seg, *newseg, *prevseg = NULL;
struct aspath *newpath = NULL, *mergedpath;
int hops, cpasns = 0;
if (!aspath)
return NULL;
seg = aspath->segments;
/* CONFEDs should get reconciled too.. */
hops = (aspath... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,268 | aspath_segment_add (struct aspath *as, int type)
{
struct assegment *seg = as->segments;
struct assegment *new = assegment_new (type, 0);
if (seg)
{
while (seg->next)
seg = seg->next;
seg->next = new;
}
else
as->segments = new;
}
| DoS | 0 | aspath_segment_add (struct aspath *as, int type)
{
struct assegment *seg = as->segments;
struct assegment *new = assegment_new (type, 0);
if (seg)
{
while (seg->next)
seg = seg->next;
seg->next = new;
}
else
as->segments = new;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,269 | aspath_str_update (struct aspath *as)
{
if (as->str)
XFREE (MTYPE_AS_STR, as->str);
aspath_make_str_count (as);
}
| DoS | 0 | aspath_str_update (struct aspath *as)
{
if (as->str)
XFREE (MTYPE_AS_STR, as->str);
aspath_make_str_count (as);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,270 | aspath_unintern (struct aspath **aspath)
{
struct aspath *ret;
struct aspath *asp = *aspath;
if (asp->refcnt)
asp->refcnt--;
if (asp->refcnt == 0)
{
/* This aspath must exist in aspath hash table. */
ret = hash_release (ashash, asp);
assert (ret != NULL);
aspath_free (asp);
... | DoS | 0 | aspath_unintern (struct aspath **aspath)
{
struct aspath *ret;
struct aspath *asp = *aspath;
if (asp->refcnt)
asp->refcnt--;
if (asp->refcnt == 0)
{
/* This aspath must exist in aspath hash table. */
ret = hash_release (ashash, asp);
assert (ret != NULL);
aspath_free (asp);
... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,271 | assegment_append_asns (struct assegment *seg, as_t *asnos, int num)
{
as_t *newas;
newas = XREALLOC (MTYPE_AS_SEG_DATA, seg->as,
ASSEGMENT_DATA_SIZE (seg->length + num, 1));
if (newas)
{
seg->as = newas;
memcpy (seg->as + seg->length, asnos, ASSEGMENT_DATA_SIZE(num, 1));
seg->len... | DoS | 0 | assegment_append_asns (struct assegment *seg, as_t *asnos, int num)
{
as_t *newas;
newas = XREALLOC (MTYPE_AS_SEG_DATA, seg->as,
ASSEGMENT_DATA_SIZE (seg->length + num, 1));
if (newas)
{
seg->as = newas;
memcpy (seg->as + seg->length, asnos, ASSEGMENT_DATA_SIZE(num, 1));
seg->len... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,272 | assegment_count_asns (struct assegment *seg, int from)
{
int count = 0;
while (seg)
{
if (!from)
count += seg->length;
else
{
count += (seg->length - from);
from = 0;
}
seg = seg->next;
}
return count;
}
| DoS | 0 | assegment_count_asns (struct assegment *seg, int from)
{
int count = 0;
while (seg)
{
if (!from)
count += seg->length;
else
{
count += (seg->length - from);
from = 0;
}
seg = seg->next;
}
return count;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,273 | assegment_data_new (int num)
{
return (XMALLOC (MTYPE_AS_SEG_DATA, ASSEGMENT_DATA_SIZE (num, 1)));
}
| DoS | 0 | assegment_data_new (int num)
{
return (XMALLOC (MTYPE_AS_SEG_DATA, ASSEGMENT_DATA_SIZE (num, 1)));
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,274 | assegment_data_put (struct stream *s, as_t *as, int num, int use32bit)
{
int i;
assert (num <= AS_SEGMENT_MAX);
for (i = 0; i < num; i++)
if ( use32bit )
stream_putl (s, as[i]);
else
{
if ( as[i] <= BGP_AS_MAX )
stream_putw(s, as[i]);
else
stream_putw(s, BGP_AS_TRANS);
... | DoS | 0 | assegment_data_put (struct stream *s, as_t *as, int num, int use32bit)
{
int i;
assert (num <= AS_SEGMENT_MAX);
for (i = 0; i < num; i++)
if ( use32bit )
stream_putl (s, as[i]);
else
{
if ( as[i] <= BGP_AS_MAX )
stream_putw(s, as[i]);
else
stream_putw(s, BGP_AS_TRANS);
... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,275 | assegment_dup (struct assegment *seg)
{
struct assegment *new;
new = assegment_new (seg->type, seg->length);
memcpy (new->as, seg->as, ASSEGMENT_DATA_SIZE (new->length, 1) );
return new;
}
| DoS | 0 | assegment_dup (struct assegment *seg)
{
struct assegment *new;
new = assegment_new (seg->type, seg->length);
memcpy (new->as, seg->as, ASSEGMENT_DATA_SIZE (new->length, 1) );
return new;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,276 | assegment_dup_all (struct assegment *seg)
{
struct assegment *new = NULL;
struct assegment *head = NULL;
while (seg)
{
if (head)
{
new->next = assegment_dup (seg);
new = new->next;
}
else
head = new = assegment_dup (seg);
seg = seg->next;... | DoS | 0 | assegment_dup_all (struct assegment *seg)
{
struct assegment *new = NULL;
struct assegment *head = NULL;
while (seg)
{
if (head)
{
new->next = assegment_dup (seg);
new = new->next;
}
else
head = new = assegment_dup (seg);
seg = seg->next;... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,277 | assegment_free_all (struct assegment *seg)
{
struct assegment *prev;
while (seg)
{
prev = seg;
seg = seg->next;
assegment_free (prev);
}
}
| DoS | 0 | assegment_free_all (struct assegment *seg)
{
struct assegment *prev;
while (seg)
{
prev = seg;
seg = seg->next;
assegment_free (prev);
}
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,278 | assegment_header_put (struct stream *s, u_char type, int length)
{
size_t lenp;
assert (length <= AS_SEGMENT_MAX);
stream_putc (s, type);
lenp = stream_get_endp (s);
stream_putc (s, length);
return lenp;
}
| DoS | 0 | assegment_header_put (struct stream *s, u_char type, int length)
{
size_t lenp;
assert (length <= AS_SEGMENT_MAX);
stream_putc (s, type);
lenp = stream_get_endp (s);
stream_putc (s, length);
return lenp;
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,279 | assegments_parse (struct stream *s, size_t length,
struct assegment **result, int use32bit)
{
struct assegment_header segh;
struct assegment *seg, *prev = NULL, *head = NULL;
size_t bytes = 0;
/* empty aspath (ie iBGP or somesuch) */
if (length == 0)
return 0;
if (BGP_DEBUG (as4... | DoS | 0 | assegments_parse (struct stream *s, size_t length,
struct assegment **result, int use32bit)
{
struct assegment_header segh;
struct assegment *seg, *prev = NULL, *head = NULL;
size_t bytes = 0;
/* empty aspath (ie iBGP or somesuch) */
if (length == 0)
return 0;
if (BGP_DEBUG (as4... | @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,280 | int_cmp (const void *p1, const void *p2)
{
const as_t *as1 = p1;
const as_t *as2 = p2;
return (*as1 == *as2)
? 0 : ( (*as1 > *as2) ? 1 : -1);
}
| DoS | 0 | int_cmp (const void *p1, const void *p2)
{
const as_t *as1 = p1;
const as_t *as2 = p2;
return (*as1 == *as2)
? 0 : ( (*as1 > *as2) ? 1 : -1);
}
| @@ -903,7 +903,7 @@ aspath_put (struct stream *s, struct aspath *as, int use32bit )
assegment_header_put (s, seg->type, AS_SEGMENT_MAX);
assegment_data_put (s, seg->as, AS_SEGMENT_MAX, use32bit);
written += AS_SEGMENT_MAX;
- bytes += ASSEGMENT_SIZE (written, use... | CWE-20 | null | null |
1,281 | int canonical_checksum(int csum_type)
{
return csum_type >= CSUM_MD4 ? 1 : 0;
}
| Bypass | 0 | int canonical_checksum(int csum_type)
{
return csum_type >= CSUM_MD4 ? 1 : 0;
}
| @@ -295,6 +295,7 @@ void sum_update(const char *p, int32 len)
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
+ case CSUM_MD4_ARCHAIC:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
... | CWE-354 | null | null |
1,282 | int csum_len_for_type(int cst)
{
switch (cst) {
case CSUM_NONE:
return 1;
case CSUM_MD4_ARCHAIC:
return 2;
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
return MD4_DIGEST_LEN;
case CSUM_MD5:
return MD5_DIGEST_LEN;
}
return 0;
}
| Bypass | 0 | int csum_len_for_type(int cst)
{
switch (cst) {
case CSUM_NONE:
return 1;
case CSUM_MD4_ARCHAIC:
return 2;
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
return MD4_DIGEST_LEN;
case CSUM_MD5:
return MD5_DIGEST_LEN;
}
return 0;
}
| @@ -295,6 +295,7 @@ void sum_update(const char *p, int32 len)
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
+ case CSUM_MD4_ARCHAIC:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
... | CWE-354 | null | null |
1,283 | void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
{
struct map_struct *buf;
OFF_T i, len = st_p->st_size;
md_context m;
int32 remainder;
int fd;
memset(sum, 0, MAX_DIGEST_LEN);
fd = do_open(fname, O_RDONLY, 0);
if (fd == -1)
return;
buf = map_file(fd, len, MAX_MAP_SIZE, CSUM_CHUNK)... | Bypass | 0 | void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
{
struct map_struct *buf;
OFF_T i, len = st_p->st_size;
md_context m;
int32 remainder;
int fd;
memset(sum, 0, MAX_DIGEST_LEN);
fd = do_open(fname, O_RDONLY, 0);
if (fd == -1)
return;
buf = map_file(fd, len, MAX_MAP_SIZE, CSUM_CHUNK)... | @@ -295,6 +295,7 @@ void sum_update(const char *p, int32 len)
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
+ case CSUM_MD4_ARCHAIC:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
... | CWE-354 | null | null |
1,284 | uint32 get_checksum1(char *buf1, int32 len)
{
int32 i;
uint32 s1, s2;
schar *buf = (schar *)buf1;
s1 = s2 = 0;
for (i = 0; i < (len-4); i+=4) {
s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] +
10*CHAR_OFFSET;
s1 += (buf[i+0] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET);
}
... | Bypass | 0 | uint32 get_checksum1(char *buf1, int32 len)
{
int32 i;
uint32 s1, s2;
schar *buf = (schar *)buf1;
s1 = s2 = 0;
for (i = 0; i < (len-4); i+=4) {
s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] +
10*CHAR_OFFSET;
s1 += (buf[i+0] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET);
}
... | @@ -295,6 +295,7 @@ void sum_update(const char *p, int32 len)
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
+ case CSUM_MD4_ARCHAIC:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
... | CWE-354 | null | null |
1,285 | void get_checksum2(char *buf, int32 len, char *sum)
{
md_context m;
switch (xfersum_type) {
case CSUM_MD5: {
uchar seedbuf[4];
md5_begin(&m);
if (proper_seed_order) {
if (checksum_seed) {
SIVALu(seedbuf, 0, checksum_seed);
md5_update(&m, seedbuf, 4);
}
md5_update(&m, (uchar *)buf, len);
}... | Bypass | 0 | void get_checksum2(char *buf, int32 len, char *sum)
{
md_context m;
switch (xfersum_type) {
case CSUM_MD5: {
uchar seedbuf[4];
md5_begin(&m);
if (proper_seed_order) {
if (checksum_seed) {
SIVALu(seedbuf, 0, checksum_seed);
md5_update(&m, seedbuf, 4);
}
md5_update(&m, (uchar *)buf, len);
}... | @@ -295,6 +295,7 @@ void sum_update(const char *p, int32 len)
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
+ case CSUM_MD4_ARCHAIC:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
... | CWE-354 | null | null |
1,286 | int parse_checksum_choice(void)
{
char *cp = checksum_choice ? strchr(checksum_choice, ',') : NULL;
if (cp) {
xfersum_type = parse_csum_name(checksum_choice, cp - checksum_choice);
checksum_type = parse_csum_name(cp+1, -1);
} else
xfersum_type = checksum_type = parse_csum_name(checksum_choice, -1);
return xfe... | Bypass | 0 | int parse_checksum_choice(void)
{
char *cp = checksum_choice ? strchr(checksum_choice, ',') : NULL;
if (cp) {
xfersum_type = parse_csum_name(checksum_choice, cp - checksum_choice);
checksum_type = parse_csum_name(cp+1, -1);
} else
xfersum_type = checksum_type = parse_csum_name(checksum_choice, -1);
return xfe... | @@ -295,6 +295,7 @@ void sum_update(const char *p, int32 len)
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
+ case CSUM_MD4_ARCHAIC:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
... | CWE-354 | null | null |
1,287 | int parse_csum_name(const char *name, int len)
{
if (len < 0 && name)
len = strlen(name);
if (!name || (len == 4 && strncasecmp(name, "auto", 4) == 0)) {
if (protocol_version >= 30)
return CSUM_MD5;
if (protocol_version >= 27)
return CSUM_MD4_OLD;
if (protocol_version >= 21)
return CSUM_MD4_BUSTED;
... | Bypass | 0 | int parse_csum_name(const char *name, int len)
{
if (len < 0 && name)
len = strlen(name);
if (!name || (len == 4 && strncasecmp(name, "auto", 4) == 0)) {
if (protocol_version >= 30)
return CSUM_MD5;
if (protocol_version >= 27)
return CSUM_MD4_OLD;
if (protocol_version >= 21)
return CSUM_MD4_BUSTED;
... | @@ -295,6 +295,7 @@ void sum_update(const char *p, int32 len)
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
+ case CSUM_MD4_ARCHAIC:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
... | CWE-354 | null | null |
1,288 | void sum_init(int csum_type, int seed)
{
char s[4];
if (csum_type < 0)
csum_type = parse_csum_name(NULL, 0);
cursum_type = csum_type;
switch (csum_type) {
case CSUM_MD5:
md5_begin(&md);
break;
case CSUM_MD4:
mdfour_begin(&md);
sumresidue = 0;
break;
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:... | Bypass | 0 | void sum_init(int csum_type, int seed)
{
char s[4];
if (csum_type < 0)
csum_type = parse_csum_name(NULL, 0);
cursum_type = csum_type;
switch (csum_type) {
case CSUM_MD5:
md5_begin(&md);
break;
case CSUM_MD4:
mdfour_begin(&md);
sumresidue = 0;
break;
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:... | @@ -295,6 +295,7 @@ void sum_update(const char *p, int32 len)
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
+ case CSUM_MD4_ARCHAIC:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
... | CWE-354 | null | null |
1,289 | void auth_client(int fd, const char *user, const char *challenge)
{
const char *pass;
char pass2[MAX_DIGEST_LEN*2];
if (!user || !*user)
user = "nobody";
if (!(pass = getpassf(password_file))
&& !(pass = getenv("RSYNC_PASSWORD"))) {
/* XXX: cyeoh says that getpass is deprecated, because
* it may return a... | Bypass | 0 | void auth_client(int fd, const char *user, const char *challenge)
{
const char *pass;
char pass2[MAX_DIGEST_LEN*2];
if (!user || !*user)
user = "nobody";
if (!(pass = getpassf(password_file))
&& !(pass = getenv("RSYNC_PASSWORD"))) {
/* XXX: cyeoh says that getpass is deprecated, because
* it may return a... | @@ -22,6 +22,7 @@
#include "itypes.h"
extern int read_only;
+extern int protocol_version;
extern char *password_file;
/***************************************************************************
@@ -237,6 +238,11 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
if (!users || !*use... | CWE-354 | null | null |
1,290 | void base64_encode(const char *buf, int len, char *out, int pad)
{
char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
int bit_offset, byte_offset, idx, i;
const uchar *d = (const uchar *)buf;
int bytes = (len*8 + 5)/6;
for (i = 0; i < bytes; i++) {
byte_offset = (i*6)/8;
bit_offse... | Bypass | 0 | void base64_encode(const char *buf, int len, char *out, int pad)
{
char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
int bit_offset, byte_offset, idx, i;
const uchar *d = (const uchar *)buf;
int bytes = (len*8 + 5)/6;
for (i = 0; i < bytes; i++) {
byte_offset = (i*6)/8;
bit_offse... | @@ -22,6 +22,7 @@
#include "itypes.h"
extern int read_only;
+extern int protocol_version;
extern char *password_file;
/***************************************************************************
@@ -237,6 +238,11 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
if (!users || !*use... | CWE-354 | null | null |
1,291 | static const char *check_secret(int module, const char *user, const char *group,
const char *challenge, const char *pass)
{
char line[1024];
char pass2[MAX_DIGEST_LEN*2];
const char *fname = lp_secrets_file(module);
STRUCT_STAT st;
int ok = 1;
int user_len = strlen(user);
int group_len = group ? strlen(group... | Bypass | 0 | static const char *check_secret(int module, const char *user, const char *group,
const char *challenge, const char *pass)
{
char line[1024];
char pass2[MAX_DIGEST_LEN*2];
const char *fname = lp_secrets_file(module);
STRUCT_STAT st;
int ok = 1;
int user_len = strlen(user);
int group_len = group ? strlen(group... | @@ -22,6 +22,7 @@
#include "itypes.h"
extern int read_only;
+extern int protocol_version;
extern char *password_file;
/***************************************************************************
@@ -237,6 +238,11 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
if (!users || !*use... | CWE-354 | null | null |
1,292 | static void gen_challenge(const char *addr, char *challenge)
{
char input[32];
char digest[MAX_DIGEST_LEN];
struct timeval tv;
int len;
memset(input, 0, sizeof input);
strlcpy(input, addr, 17);
sys_gettimeofday(&tv);
SIVAL(input, 16, tv.tv_sec);
SIVAL(input, 20, tv.tv_usec);
SIVAL(input, 24, getpid());
su... | Bypass | 0 | static void gen_challenge(const char *addr, char *challenge)
{
char input[32];
char digest[MAX_DIGEST_LEN];
struct timeval tv;
int len;
memset(input, 0, sizeof input);
strlcpy(input, addr, 17);
sys_gettimeofday(&tv);
SIVAL(input, 16, tv.tv_sec);
SIVAL(input, 20, tv.tv_usec);
SIVAL(input, 24, getpid());
su... | @@ -22,6 +22,7 @@
#include "itypes.h"
extern int read_only;
+extern int protocol_version;
extern char *password_file;
/***************************************************************************
@@ -237,6 +238,11 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
if (!users || !*use... | CWE-354 | null | null |
1,293 | static void generate_hash(const char *in, const char *challenge, char *out)
{
char buf[MAX_DIGEST_LEN];
int len;
sum_init(-1, 0);
sum_update(in, strlen(in));
sum_update(challenge, strlen(challenge));
len = sum_end(buf);
base64_encode(buf, len, out, 0);
}
| Bypass | 0 | static void generate_hash(const char *in, const char *challenge, char *out)
{
char buf[MAX_DIGEST_LEN];
int len;
sum_init(-1, 0);
sum_update(in, strlen(in));
sum_update(challenge, strlen(challenge));
len = sum_end(buf);
base64_encode(buf, len, out, 0);
}
| @@ -22,6 +22,7 @@
#include "itypes.h"
extern int read_only;
+extern int protocol_version;
extern char *password_file;
/***************************************************************************
@@ -237,6 +238,11 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
if (!users || !*use... | CWE-354 | null | null |
1,294 | static const char *getpassf(const char *filename)
{
STRUCT_STAT st;
char buffer[512], *p;
int n;
if (!filename)
return NULL;
if (strcmp(filename, "-") == 0) {
n = fgets(buffer, sizeof buffer, stdin) == NULL ? -1 : (int)strlen(buffer);
} else {
int fd;
if ((fd = open(filename,O_RDONLY)) < 0) {
rsyser... | Bypass | 0 | static const char *getpassf(const char *filename)
{
STRUCT_STAT st;
char buffer[512], *p;
int n;
if (!filename)
return NULL;
if (strcmp(filename, "-") == 0) {
n = fgets(buffer, sizeof buffer, stdin) == NULL ? -1 : (int)strlen(buffer);
} else {
int fd;
if ((fd = open(filename,O_RDONLY)) < 0) {
rsyser... | @@ -22,6 +22,7 @@
#include "itypes.h"
extern int read_only;
+extern int protocol_version;
extern char *password_file;
/***************************************************************************
@@ -237,6 +238,11 @@ char *auth_server(int f_in, int f_out, int module, const char *host,
if (!users || !*use... | CWE-354 | null | null |
1,295 | void sum_update(const char *p, int32 len)
{
switch (cursum_type) {
case CSUM_MD5:
md5_update(&md, (uchar *)p, len);
break;
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
sumresidue += len;
break;
}
if ... | Bypass | 0 | void sum_update(const char *p, int32 len)
{
switch (cursum_type) {
case CSUM_MD5:
md5_update(&md, (uchar *)p, len);
break;
case CSUM_MD4:
case CSUM_MD4_OLD:
case CSUM_MD4_BUSTED:
if (len + sumresidue < CSUM_CHUNK) {
memcpy(md.buffer + sumresidue, p, len);
sumresidue += len;
break;
}
if ... | @@ -27,7 +27,7 @@ extern int proper_seed_order;
extern char *checksum_choice;
#define CSUM_NONE 0
-#define CSUM_ARCHAIC 1
+#define CSUM_MD4_ARCHAIC 1
#define CSUM_MD4_BUSTED 2
#define CSUM_MD4_OLD 3
#define CSUM_MD4 4
@@ -60,7 +60,7 @@ int parse_csum_name(const char *name, int len)
return... | CWE-354 | null | null |
1,296 | static ENUM_PTRS_BEGIN(pattern1_instance_enum_ptrs) {
if (index < st_pattern1_template_max_ptrs) {
gs_ptr_type_t ptype =
ENUM_SUPER_ELT(gs_pattern1_instance_t, st_pattern1_template,
templat, 0);
if (ptype)
return ptype;
return ENUM_OBJ(NUL... | Exec Code | 0 | static ENUM_PTRS_BEGIN(pattern1_instance_enum_ptrs) {
if (index < st_pattern1_template_max_ptrs) {
gs_ptr_type_t ptype =
ENUM_SUPER_ELT(gs_pattern1_instance_t, st_pattern1_template,
templat, 0);
if (ptype)
return ptype;
return ENUM_OBJ(NUL... | @@ -50,7 +50,7 @@
/* GC descriptors */
private_st_pattern1_template();
-private_st_pattern1_instance();
+public_st_pattern1_instance();
/* GC procedures */
static ENUM_PTRS_BEGIN(pattern1_instance_enum_ptrs) { | CWE-704 | null | null |
1,297 | static ENUM_PTRS_BEGIN(dc_binary_masked_enum_ptrs)
{
return ENUM_USING(st_dc_ht_binary, vptr, size, index - 2);
}
| Exec Code | 0 | static ENUM_PTRS_BEGIN(dc_binary_masked_enum_ptrs)
{
return ENUM_USING(st_dc_ht_binary, vptr, size, index - 2);
}
| @@ -50,7 +50,7 @@
/* GC descriptors */
private_st_pattern1_template();
-private_st_pattern1_instance();
+public_st_pattern1_instance();
/* GC procedures */
static ENUM_PTRS_BEGIN(pattern1_instance_enum_ptrs) { | CWE-704 | null | null |
1,298 | ENUM_PTRS_WITH(dc_pattern_enum_ptrs, gx_device_color *cptr)
{
return ENUM_USING(st_dc_pure_masked, vptr, size, index - 1);
}
| Exec Code | 0 | ENUM_PTRS_WITH(dc_pattern_enum_ptrs, gx_device_color *cptr)
{
return ENUM_USING(st_dc_pure_masked, vptr, size, index - 1);
}
| @@ -50,7 +50,7 @@
/* GC descriptors */
private_st_pattern1_template();
-private_st_pattern1_instance();
+public_st_pattern1_instance();
/* GC procedures */
static ENUM_PTRS_BEGIN(pattern1_instance_enum_ptrs) { | CWE-704 | null | null |
1,299 | static RELOC_PTRS_BEGIN(dc_binary_masked_reloc_ptrs)
{
RELOC_USING(st_dc_pure_masked, vptr, size);
RELOC_USING(st_dc_ht_binary, vptr, size);
}
| Exec Code | 0 | static RELOC_PTRS_BEGIN(dc_binary_masked_reloc_ptrs)
{
RELOC_USING(st_dc_pure_masked, vptr, size);
RELOC_USING(st_dc_ht_binary, vptr, size);
}
| @@ -50,7 +50,7 @@
/* GC descriptors */
private_st_pattern1_template();
-private_st_pattern1_instance();
+public_st_pattern1_instance();
/* GC procedures */
static ENUM_PTRS_BEGIN(pattern1_instance_enum_ptrs) { | CWE-704 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.