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,400 | static void vga_draw_text(VGACommonState *s, int full_update)
{
DisplaySurface *surface = qemu_console_surface(s->con);
int cx, cy, cheight, cw, ch, cattr, height, width, ch_attr;
int cx_min, cx_max, linesize, x_incr, line, line1;
uint32_t offset, fgcol, bgcol, v, cursor_offset;
uint8_t *d1, *d, *sr... | DoS | 0 | static void vga_draw_text(VGACommonState *s, int full_update)
{
DisplaySurface *surface = qemu_console_surface(s->con);
int cx, cy, cheight, cw, ch, cattr, height, width, ch_attr;
int cx_min, cx_max, linesize, x_incr, line, line1;
uint32_t offset, fgcol, bgcol, v, cursor_offset;
uint8_t *d1, *d, *sr... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,401 | static uint8_t vga_dumb_retrace(VGACommonState *s)
{
return s->st01 ^ (ST01_V_RETRACE | ST01_DISP_ENABLE);
}
| DoS | 0 | static uint8_t vga_dumb_retrace(VGACommonState *s)
{
return s->st01 ^ (ST01_V_RETRACE | ST01_DISP_ENABLE);
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,402 | static void vga_dumb_update_retrace_info(VGACommonState *s)
{
(void) s;
}
| DoS | 0 | static void vga_dumb_update_retrace_info(VGACommonState *s)
{
(void) s;
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,403 | static bool vga_endian_state_needed(void *opaque)
{
VGACommonState *s = opaque;
/*
* Only send the endian state if it's different from the
* default one, thus ensuring backward compatibility for
* migration of the common case
*/
return s->default_endian_fb != s->big_endian_fb;
}
| DoS | 0 | static bool vga_endian_state_needed(void *opaque)
{
VGACommonState *s = opaque;
/*
* Only send the endian state if it's different from the
* default one, thus ensuring backward compatibility for
* migration of the common case
*/
return s->default_endian_fb != s->big_endian_fb;
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,404 | static void vga_get_offsets(VGACommonState *s,
uint32_t *pline_offset,
uint32_t *pstart_addr,
uint32_t *pline_compare)
{
uint32_t start_addr, line_offset, line_compare;
if (vbe_enabled(s)) {
line_offset = s->vbe_line_of... | DoS | 0 | static void vga_get_offsets(VGACommonState *s,
uint32_t *pline_offset,
uint32_t *pstart_addr,
uint32_t *pline_compare)
{
uint32_t start_addr, line_offset, line_compare;
if (vbe_enabled(s)) {
line_offset = s->vbe_line_of... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,405 | static void vga_get_resolution(VGACommonState *s, int *pwidth, int *pheight)
{
int width, height;
if (vbe_enabled(s)) {
width = s->vbe_regs[VBE_DISPI_INDEX_XRES];
height = s->vbe_regs[VBE_DISPI_INDEX_YRES];
} else {
width = (s->cr[VGA_CRTC_H_DISP] + 1) * 8;
height = s->cr[VG... | DoS | 0 | static void vga_get_resolution(VGACommonState *s, int *pwidth, int *pheight)
{
int width, height;
if (vbe_enabled(s)) {
width = s->vbe_regs[VBE_DISPI_INDEX_XRES];
height = s->vbe_regs[VBE_DISPI_INDEX_YRES];
} else {
width = (s->cr[VGA_CRTC_H_DISP] + 1) * 8;
height = s->cr[VG... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,406 | void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
MemoryRegion *address_space_io, bool init_vga_ports)
{
MemoryRegion *vga_io_memory;
const MemoryRegionPortio *vga_ports, *vbe_ports;
qemu_register_reset(vga_reset, s);
s->bank_offset = 0;
s->legacy_address_sp... | DoS | 0 | void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
MemoryRegion *address_space_io, bool init_vga_ports)
{
MemoryRegion *vga_io_memory;
const MemoryRegionPortio *vga_ports, *vbe_ports;
qemu_register_reset(vga_reset, s);
s->bank_offset = 0;
s->legacy_address_sp... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,407 | MemoryRegion *vga_init_io(VGACommonState *s, Object *obj,
const MemoryRegionPortio **vga_ports,
const MemoryRegionPortio **vbe_ports)
{
MemoryRegion *vga_mem;
*vga_ports = vga_portio_list;
*vbe_ports = vbe_portio_list;
vga_mem = g_malloc(sizeof(*vga_... | DoS | 0 | MemoryRegion *vga_init_io(VGACommonState *s, Object *obj,
const MemoryRegionPortio **vga_ports,
const MemoryRegionPortio **vbe_ports)
{
MemoryRegion *vga_mem;
*vga_ports = vga_portio_list;
*vbe_ports = vbe_portio_list;
vga_mem = g_malloc(sizeof(*vga_... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,408 | void vga_init_vbe(VGACommonState *s, Object *obj, MemoryRegion *system_memory)
{
/* With pc-0.12 and below we map both the PCI BAR and the fixed VBE region,
* so use an alias to avoid double-mapping the same region.
*/
memory_region_init_alias(&s->vram_vbe, obj, "vram.vbe",
... | DoS | 0 | void vga_init_vbe(VGACommonState *s, Object *obj, MemoryRegion *system_memory)
{
/* With pc-0.12 and below we map both the PCI BAR and the fixed VBE region,
* so use an alias to avoid double-mapping the same region.
*/
memory_region_init_alias(&s->vram_vbe, obj, "vram.vbe",
... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,409 | static void vga_invalidate_display(void *opaque)
{
VGACommonState *s = opaque;
s->last_width = -1;
s->last_height = -1;
}
| DoS | 0 | static void vga_invalidate_display(void *opaque)
{
VGACommonState *s = opaque;
s->last_width = -1;
s->last_height = -1;
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,410 | void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2)
{
int y;
if (y1 >= VGA_MAX_HEIGHT)
return;
if (y2 >= VGA_MAX_HEIGHT)
y2 = VGA_MAX_HEIGHT;
for(y = y1; y < y2; y++) {
s->invalidated_y_table[y >> 5] |= 1 << (y & 0x1f);
}
}
| DoS | 0 | void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2)
{
int y;
if (y1 >= VGA_MAX_HEIGHT)
return;
if (y2 >= VGA_MAX_HEIGHT)
y2 = VGA_MAX_HEIGHT;
for(y = y1; y < y2; y++) {
s->invalidated_y_table[y >> 5] |= 1 << (y & 0x1f);
}
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,411 | int vga_ioport_invalid(VGACommonState *s, uint32_t addr)
{
if (s->msr & VGA_MIS_COLOR) {
/* Color */
return (addr >= 0x3b0 && addr <= 0x3bf);
} else {
/* Monochrome */
return (addr >= 0x3d0 && addr <= 0x3df);
}
}
| DoS | 0 | int vga_ioport_invalid(VGACommonState *s, uint32_t addr)
{
if (s->msr & VGA_MIS_COLOR) {
/* Color */
return (addr >= 0x3b0 && addr <= 0x3bf);
} else {
/* Monochrome */
return (addr >= 0x3d0 && addr <= 0x3df);
}
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,412 | uint32_t vga_ioport_read(void *opaque, uint32_t addr)
{
VGACommonState *s = opaque;
int val, index;
if (vga_ioport_invalid(s, addr)) {
val = 0xff;
} else {
switch(addr) {
case VGA_ATT_W:
if (s->ar_flip_flop == 0) {
val = s->ar_index;
} els... | DoS | 0 | uint32_t vga_ioport_read(void *opaque, uint32_t addr)
{
VGACommonState *s = opaque;
int val, index;
if (vga_ioport_invalid(s, addr)) {
val = 0xff;
} else {
switch(addr) {
case VGA_ATT_W:
if (s->ar_flip_flop == 0) {
val = s->ar_index;
} els... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,413 | static uint64_t vga_mem_read(void *opaque, hwaddr addr,
unsigned size)
{
VGACommonState *s = opaque;
return vga_mem_readb(s, addr);
}
| DoS | 0 | static uint64_t vga_mem_read(void *opaque, hwaddr addr,
unsigned size)
{
VGACommonState *s = opaque;
return vga_mem_readb(s, addr);
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,414 | uint32_t vga_mem_readb(VGACommonState *s, hwaddr addr)
{
int memory_map_mode, plane;
uint32_t ret;
/* convert to VGA memory offset */
memory_map_mode = (s->gr[VGA_GFX_MISC] >> 2) & 3;
addr &= 0x1ffff;
switch(memory_map_mode) {
case 0:
break;
case 1:
if (addr >= 0x10000)
... | DoS | 0 | uint32_t vga_mem_readb(VGACommonState *s, hwaddr addr)
{
int memory_map_mode, plane;
uint32_t ret;
/* convert to VGA memory offset */
memory_map_mode = (s->gr[VGA_GFX_MISC] >> 2) & 3;
addr &= 0x1ffff;
switch(memory_map_mode) {
case 0:
break;
case 1:
if (addr >= 0x10000)
... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,415 | static void vga_mem_write(void *opaque, hwaddr addr,
uint64_t data, unsigned size)
{
VGACommonState *s = opaque;
vga_mem_writeb(s, addr, data);
}
| DoS | 0 | static void vga_mem_write(void *opaque, hwaddr addr,
uint64_t data, unsigned size)
{
VGACommonState *s = opaque;
vga_mem_writeb(s, addr, data);
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,416 | void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
{
int memory_map_mode, plane, write_mode, b, func_select, mask;
uint32_t write_mask, bit_mask, set_mask;
#ifdef DEBUG_VGA_MEM
printf("vga: [0x" TARGET_FMT_plx "] = 0x%02x\n", addr, val);
#endif
/* convert to VGA memory offset */
memo... | DoS | 0 | void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
{
int memory_map_mode, plane, write_mode, b, func_select, mask;
uint32_t write_mask, bit_mask, set_mask;
#ifdef DEBUG_VGA_MEM
printf("vga: [0x" TARGET_FMT_plx "] = 0x%02x\n", addr, val);
#endif
/* convert to VGA memory offset */
memo... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,417 | static uint8_t vga_precise_retrace(VGACommonState *s)
{
struct vga_precise_retrace *r = &s->retrace_info.precise;
uint8_t val = s->st01 & ~(ST01_V_RETRACE | ST01_DISP_ENABLE);
if (r->total_chars) {
int cur_line, cur_line_char, cur_char;
int64_t cur_tick;
cur_tick = qemu_clock_get_n... | DoS | 0 | static uint8_t vga_precise_retrace(VGACommonState *s)
{
struct vga_precise_retrace *r = &s->retrace_info.precise;
uint8_t val = s->st01 & ~(ST01_V_RETRACE | ST01_DISP_ENABLE);
if (r->total_chars) {
int cur_line, cur_line_char, cur_char;
int64_t cur_tick;
cur_tick = qemu_clock_get_n... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,418 | static void vga_precise_update_retrace_info(VGACommonState *s)
{
int htotal_chars;
int hretr_start_char;
int hretr_skew_chars;
int hretr_end_char;
int vtotal_lines;
int vretr_start_line;
int vretr_end_line;
int dots;
#if 0
int div2, sldiv2;
#endif
int clocking_mode;
int clo... | DoS | 0 | static void vga_precise_update_retrace_info(VGACommonState *s)
{
int htotal_chars;
int hretr_start_char;
int hretr_skew_chars;
int hretr_end_char;
int vtotal_lines;
int vretr_start_line;
int vretr_end_line;
int dots;
#if 0
int div2, sldiv2;
#endif
int clocking_mode;
int clo... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,419 | static void vga_reset(void *opaque)
{
VGACommonState *s = opaque;
vga_common_reset(s);
}
| DoS | 0 | static void vga_reset(void *opaque)
{
VGACommonState *s = opaque;
vga_common_reset(s);
}
| @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,420 | static void vga_update_display(void *opaque)
{
VGACommonState *s = opaque;
DisplaySurface *surface = qemu_console_surface(s->con);
int full_update, graphic_mode;
qemu_flush_coalesced_mmio_buffer();
if (surface_bits_per_pixel(surface) == 0) {
/* nothing to do */
} else {
full_up... | DoS | 0 | static void vga_update_display(void *opaque)
{
VGACommonState *s = opaque;
DisplaySurface *surface = qemu_console_surface(s->con);
int full_update, graphic_mode;
qemu_flush_coalesced_mmio_buffer();
if (surface_bits_per_pixel(surface) == 0) {
/* nothing to do */
} else {
full_up... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,421 | static void vga_update_memory_access(VGACommonState *s)
{
hwaddr base, offset, size;
if (s->legacy_address_space == NULL) {
return;
}
if (s->has_chain4_alias) {
memory_region_del_subregion(s->legacy_address_space, &s->chain4_alias);
object_unparent(OBJECT(&s->chain4_alias));
... | DoS | 0 | static void vga_update_memory_access(VGACommonState *s)
{
hwaddr base, offset, size;
if (s->legacy_address_space == NULL) {
return;
}
if (s->has_chain4_alias) {
memory_region_del_subregion(s->legacy_address_space, &s->chain4_alias);
object_unparent(OBJECT(&s->chain4_alias));
... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,422 | static void vga_update_text(void *opaque, console_ch_t *chardata)
{
VGACommonState *s = opaque;
int graphic_mode, i, cursor_offset, cursor_visible;
int cw, cheight, width, height, size, c_min, c_max;
uint32_t *src;
console_ch_t *dst, val;
char msg_buffer[80];
int full_update = 0;
qemu_... | DoS | 0 | static void vga_update_text(void *opaque, console_ch_t *chardata)
{
VGACommonState *s = opaque;
int graphic_mode, i, cursor_offset, cursor_visible;
int cw, cheight, width, height, size, c_min, c_max;
uint32_t *src;
console_ch_t *dst, val;
char msg_buffer[80];
int full_update = 0;
qemu_... | @@ -1630,7 +1630,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
if (!full_update) {
vga_sync_dirty_bitmap(s);
snap = memory_region_snapshot_and_clear_dirty(&s->vram, addr1,
- bwidth * height,
+ ... | CWE-617 | null | null |
2,423 | static int checkBlackPoint(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[3];
ref *tempref;
code = dict_find_string(CIEdict, "BlackPoint", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if ... | null | 0 | static int checkBlackPoint(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[3];
ref *tempref;
code = dict_find_string(CIEdict, "BlackPoint", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if ... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,424 | static int checkCalMatrix(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[9];
ref *tempref;
code = dict_find_string(CIEdict, "Matrix", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if (r_si... | null | 0 | static int checkCalMatrix(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[9];
ref *tempref;
code = dict_find_string(CIEdict, "Matrix", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if (r_si... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,425 | static int checkDecodeLMN(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code = 0, i;
ref *tempref, valref;
code = dict_find_string(CIEdict, "DecodeLMN", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if (r_size... | null | 0 | static int checkDecodeLMN(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code = 0, i;
ref *tempref, valref;
code = dict_find_string(CIEdict, "DecodeLMN", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if (r_size... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,426 | static int checkGamma(i_ctx_t * i_ctx_p, ref *CIEdict, int numvalues)
{
int code = 0, i;
float value[3];
ref *tempref, valref;
code = dict_find_string(CIEdict, "Gamma", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (numvalues > 1) {
/* Array of gammas (RGB) */
... | null | 0 | static int checkGamma(i_ctx_t * i_ctx_p, ref *CIEdict, int numvalues)
{
int code = 0, i;
float value[3];
ref *tempref, valref;
code = dict_find_string(CIEdict, "Gamma", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (numvalues > 1) {
/* Array of gammas (RGB) */
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,427 | static int checkMatrixLMN(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[9];
ref *tempref;
code = dict_find_string(CIEdict, "MatrixLMN", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if (r... | null | 0 | static int checkMatrixLMN(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[9];
ref *tempref;
code = dict_find_string(CIEdict, "MatrixLMN", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if (r... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,428 | static int checkWhitePoint(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[3];
ref *tempref;
code = dict_find_string(CIEdict, "WhitePoint", &tempref);
if (code < 0)
return code;
if (code == 0 || r_has_type(tempref, t_null))
return gs_note_error(gs_error_undefined);
... | null | 0 | static int checkWhitePoint(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[3];
ref *tempref;
code = dict_find_string(CIEdict, "WhitePoint", &tempref);
if (code < 0)
return code;
if (code == 0 || r_has_type(tempref, t_null))
return gs_note_error(gs_error_undefined);
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,429 | static int checkrangeab(i_ctx_t * i_ctx_p, ref *labdict)
{
int code = 0, i;
float value[4];
ref *tempref, valref;
code = dict_find_string(labdict, "Range", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
... | null | 0 | static int checkrangeab(i_ctx_t * i_ctx_p, ref *labdict)
{
int code = 0, i;
float value[4];
ref *tempref, valref;
code = dict_find_string(labdict, "Range", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,430 | static int cieabccompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
int code = 0;
ref CIEdict1, CIEdict2;
code = array_get(imemory, space, 1, &CIEdict1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &CIEdict2);
if (code < 0)
return 0;
if (!compare... | null | 0 | static int cieabccompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
int code = 0;
ref CIEdict1, CIEdict2;
code = array_get(imemory, space, 1, &CIEdict1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &CIEdict2);
if (code < 0)
return 0;
if (!compare... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,431 | static int cieabcdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeABC, get the values from that */
code = dict_find_string(&CIEdict, "RangeABC", &tempref);... | null | 0 | static int cieabcdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeABC, get the values from that */
code = dict_find_string(&CIEdict, "RangeABC", &tempref);... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,432 | static int cieabcrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeABC, get the values from that */
code = dict_find_string(&CIEdict, "RangeABC", &tempre... | null | 0 | static int cieabcrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeABC, get the values from that */
code = dict_find_string(&CIEdict, "RangeABC", &tempre... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,433 | static int cieabcvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
int i;
if (num_comps < 3)
return_error(gs_error_stackunderflow);
op -= 2;
for (i=0;i<3;i++) {
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error... | null | 0 | static int cieabcvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
int i;
if (num_comps < 3)
return_error(gs_error_stackunderflow);
op -= 2;
for (i=0;i<3;i++) {
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,434 | static int cieacompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
int code = 0;
ref CIEdict1, CIEdict2;
code = array_get(imemory, space, 1, &CIEdict1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &CIEdict2);
if (code < 0)
return 0;
if (!comparedi... | null | 0 | static int cieacompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
int code = 0;
ref CIEdict1, CIEdict2;
code = array_get(imemory, space, 1, &CIEdict1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &CIEdict2);
if (code < 0)
return 0;
if (!comparedi... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,435 | static int cieadomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeA entry in the dictionary, get the
* values from that
*/
code = dict_find_string(... | null | 0 | static int cieadomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeA entry in the dictionary, get the
* values from that
*/
code = dict_find_string(... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,436 | static int ciearange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeA entry in the dictionary, get the
* values from that
*/
code = dict_find_string(&... | null | 0 | static int ciearange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeA entry in the dictionary, get the
* values from that
*/
code = dict_find_string(&... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,437 | static int cieavalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
if (num_comps < 1)
return_error(gs_error_stackunderflow);
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error(gs_error_typecheck);
return 0;
}
| null | 0 | static int cieavalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
if (num_comps < 1)
return_error(gs_error_stackunderflow);
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error(gs_error_typecheck);
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,438 | static int ciebasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op;
ref *spacename, nref;
int i, components=1, code;
/* If the spaece is an array, the first element is always the name */
if (r_is_array(space))
spacename = space->value.refs;... | null | 0 | static int ciebasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op;
ref *spacename, nref;
int i, components=1, code;
/* If the spaece is an array, the first element is always the name */
if (r_is_array(space))
spacename = space->value.refs;... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,439 | static int ciedefcompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
int code = 0;
ref CIEdict1, CIEdict2;
code = array_get(imemory, space, 1, &CIEdict1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &CIEdict2);
if (code < 0)
return 0;
if (!compare... | null | 0 | static int ciedefcompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
int code = 0;
ref CIEdict1, CIEdict2;
code = array_get(imemory, space, 1, &CIEdict1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &CIEdict2);
if (code < 0)
return 0;
if (!compare... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,440 | static int ciedefdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeDEF, get the values from that */
code = dict_find_string(&CIEdict, "RangeDEF", &tempr... | null | 0 | static int ciedefdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeDEF, get the values from that */
code = dict_find_string(&CIEdict, "RangeDEF", &tempr... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,441 | static int ciedefgdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeDEFG, get the values from that */
code = dict_find_string(&CIEdict, "RangeDEFG", &tempre... | null | 0 | static int ciedefgdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeDEFG, get the values from that */
code = dict_find_string(&CIEdict, "RangeDEFG", &tempre... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,442 | static int ciedefgrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeDEFG, get the values from that */
code = dict_find_string(&CIEdict, "RangeDEFG", &tempref... | null | 0 | static int ciedefgrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref CIEdict, *tempref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a RangeDEFG, get the values from that */
code = dict_find_string(&CIEdict, "RangeDEFG", &tempref... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,443 | static int ciedefvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
int i;
if (num_comps < 3)
return_error(gs_error_stackunderflow);
op -= 2;
for (i=0;i<3;i++) {
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error... | null | 0 | static int ciedefvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
int i;
if (num_comps < 3)
return_error(gs_error_stackunderflow);
op -= 2;
for (i=0;i<3;i++) {
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,444 | static int cmykinitialproc(i_ctx_t *i_ctx_p, ref *space)
{
gs_client_color cc;
cc.pattern = 0x00;
cc.paint.values[0] = 0;
cc.paint.values[1] = 0;
cc.paint.values[2] = 0;
cc.paint.values[3] = 1;
return gs_setcolor(igs, &cc);
}
| null | 0 | static int cmykinitialproc(i_ctx_t *i_ctx_p, ref *space)
{
gs_client_color cc;
cc.pattern = 0x00;
cc.paint.values[0] = 0;
cc.paint.values[1] = 0;
cc.paint.values[2] = 0;
cc.paint.values[3] = 1;
return gs_setcolor(igs, &cc);
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,445 | static int cmykrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i;
for (i = 0;i < 8;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;
}
return 0;
}
| null | 0 | static int cmykrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i;
for (i = 0;i < 8;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;
}
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,446 | static int cmykvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
int i;
if (num_comps < 4)
return_error(gs_error_stackunderflow);
op -= 3;
for (i=0;i < 4;i++) {
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error... | null | 0 | static int cmykvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
int i;
if (num_comps < 4)
return_error(gs_error_stackunderflow);
op -= 3;
for (i=0;i < 4;i++) {
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,447 | static int comparearrays(i_ctx_t * i_ctx_p, ref *m1, ref *m2)
{
int i, code;
ref ref1, ref2;
if (r_size(m1) != r_size(m2))
return 0;
for (i=0;i < r_size(m1);i++) {
code = array_get(imemory, m1, i, &ref1);
if (code < 0)
return 0;
code = array_get(imemory, m2,... | null | 0 | static int comparearrays(i_ctx_t * i_ctx_p, ref *m1, ref *m2)
{
int i, code;
ref ref1, ref2;
if (r_size(m1) != r_size(m2))
return 0;
for (i=0;i < r_size(m1);i++) {
code = array_get(imemory, m1, i, &ref1);
if (code < 0)
return 0;
code = array_get(imemory, m2,... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,448 | static int devicenalternatespace(i_ctx_t * i_ctx_p, ref *space, ref **r, int *CIESubst)
{
ref altspace;
int code;
code = array_get(imemory, space, 2, &altspace);
if (code < 0)
return code;
ref_assign(*r, &altspace);
return 0;
}
| null | 0 | static int devicenalternatespace(i_ctx_t * i_ctx_p, ref *space, ref **r, int *CIESubst)
{
ref altspace;
int code;
code = array_get(imemory, space, 2, &altspace);
if (code < 0)
return code;
ref_assign(*r, &altspace);
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,449 | static int devicenbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp; /* required by "push" macro */
int code, use, n_comp;
ref narray;
code = devicentransform(i_ctx_p, space, &use, stage, stack_depth);
if (code != 0)
return cod... | null | 0 | static int devicenbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp; /* required by "push" macro */
int code, use, n_comp;
ref narray;
code = devicentransform(i_ctx_p, space, &use, stage, stack_depth);
if (code != 0)
return cod... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,450 | static int devicencolorants_cont(i_ctx_t *i_ctx_p)
{
ref dict, *pdict = &dict, space[2], sname;
int index, code, depth, stage;
es_ptr ep = esp, pindex, pstage;
os_ptr op = osp;
gs_separation_name sep_name;
pindex = &ep[-2];
pstage = &ep[-1];
index = (int)pindex->value.intval;
stage ... | null | 0 | static int devicencolorants_cont(i_ctx_t *i_ctx_p)
{
ref dict, *pdict = &dict, space[2], sname;
int index, code, depth, stage;
es_ptr ep = esp, pindex, pstage;
os_ptr op = osp;
gs_separation_name sep_name;
pindex = &ep[-2];
pstage = &ep[-1];
index = (int)pindex->value.intval;
stage ... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,451 | static int devicencompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
ref sname1, sname2;
int code;
code = array_get(imemory, space, 1, &sname1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &sname2);
if (code < 0)
return 0;
if (!r_is_array(&snam... | null | 0 | static int devicencompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
ref sname1, sname2;
int code;
code = array_get(imemory, space, 1, &sname1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &sname2);
if (code < 0)
return 0;
if (!r_is_array(&snam... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,452 | static int devicencomponents(i_ctx_t * i_ctx_p, ref *space, int *n)
{
ref namesarray;
int code;
code = array_get(imemory, space, 1, &namesarray);
if (code < 0)
return code;
*n = r_size(&namesarray);
return 0;
}
| null | 0 | static int devicencomponents(i_ctx_t * i_ctx_p, ref *space, int *n)
{
ref namesarray;
int code;
code = array_get(imemory, space, 1, &namesarray);
if (code < 0)
return code;
*n = r_size(&namesarray);
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,453 | static int devicendomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, limit, code;
ref namesarray;
code = array_get(imemory, space, 1, &namesarray);
if (code < 0)
return code;
limit = r_size(&namesarray) * 2;
for (i = 0;i < limit;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;... | null | 0 | static int devicendomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, limit, code;
ref namesarray;
code = array_get(imemory, space, 1, &namesarray);
if (code < 0)
return code;
limit = r_size(&namesarray) * 2;
for (i = 0;i < limit;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,454 | static int deviceninitialproc(i_ctx_t *i_ctx_p, ref *space)
{
gs_client_color cc;
int i, num_components, code;
ref namesarray;
code = array_get(imemory, space, 1, &namesarray);
if (code < 0)
return code;
num_components = r_size(&namesarray);
cc.pattern = 0x00;
for (i=0;i<num_com... | null | 0 | static int deviceninitialproc(i_ctx_t *i_ctx_p, ref *space)
{
gs_client_color cc;
int i, num_components, code;
ref namesarray;
code = array_get(imemory, space, 1, &namesarray);
if (code < 0)
return code;
num_components = r_size(&namesarray);
cc.pattern = 0x00;
for (i=0;i<num_com... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,455 | static int devicenrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, limit, code;
PS_colour_space_t *cspace;
ref altspace;
code = array_get(imemory, space, 1, &altspace);
if (code < 0)
return code;
code = get_space_object(i_ctx_p, &altspace, &cspace);
if (code < 0)
... | null | 0 | static int devicenrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, limit, code;
PS_colour_space_t *cspace;
ref altspace;
code = array_get(imemory, space, 1, &altspace);
if (code < 0)
return code;
code = get_space_object(i_ctx_p, &altspace, &cspace);
if (code < 0)
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,456 | static int devicentransform(i_ctx_t *i_ctx_p, ref *devicenspace, int *usealternate, int *stage, int *stack_depth)
{
gx_device * dev = igs->device;
ref narray, sname, proc;
int i, code, colorant_number;
*usealternate = 0;
code = array_get(imemory, devicenspace, 1, &narray);
if (code < 0)
... | null | 0 | static int devicentransform(i_ctx_t *i_ctx_p, ref *devicenspace, int *usealternate, int *stage, int *stack_depth)
{
gx_device * dev = igs->device;
ref narray, sname, proc;
int i, code, colorant_number;
*usealternate = 0;
code = array_get(imemory, devicenspace, 1, &narray);
if (code < 0)
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,457 | static int devicepbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp;
*stage = 0;
*cont = 0;
make_int(op, 0);
return 0;
}
| null | 0 | static int devicepbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp;
*stage = 0;
*cont = 0;
make_int(op, 0);
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,458 | static int devicepdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref tref;
code = array_get(imemory, space, 1, &tref);
if (code < 0)
return code;
ptr[0] = 0;
ptr[1] = (float)(1 << tref.value.intval);
return 0;
}
| null | 0 | static int devicepdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref tref;
code = array_get(imemory, space, 1, &tref);
if (code < 0)
return code;
ptr[0] = 0;
ptr[1] = (float)(1 << tref.value.intval);
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,459 | static int deviceprange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref tref;
code = array_get(imemory, space, 1, &tref);
if (code < 0)
return code;
ptr[0] = 0;
ptr[1] = (float)(1 << tref.value.intval);
return 0;
}
| null | 0 | static int deviceprange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int code;
ref tref;
code = array_get(imemory, space, 1, &tref);
if (code < 0)
return code;
ptr[0] = 0;
ptr[1] = (float)(1 << tref.value.intval);
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,460 | static int devicepvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
return 0;
}
| null | 0 | static int devicepvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,461 | static int dummydomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
return 0;
}
| null | 0 | static int dummydomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,462 | static int dummyrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
return 0;
}
| null | 0 | static int dummyrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,463 | static int falsecompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
return 0;
}
| null | 0 | static int falsecompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,464 | static int fourcomponent(i_ctx_t * i_ctx_p, ref *space, int *n)
{
*n = 4;
return 0;
}
| null | 0 | static int fourcomponent(i_ctx_t * i_ctx_p, ref *space, int *n)
{
*n = 4;
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,465 | static int get_cie_param_array(const gs_memory_t *mem, const ref *src, int n, float *dst) {
ref valref;
int i;
int code = 0;
for (i = 0; i < n; i++) {
code = array_get(mem, src, i, &valref);
if (code < 0)
return code;
if (r_has_type(&valref, t_integer))
dst[i] = (float)valref.value.intval;
... | null | 0 | static int get_cie_param_array(const gs_memory_t *mem, const ref *src, int n, float *dst) {
ref valref;
int i;
int code = 0;
for (i = 0; i < n; i++) {
code = array_get(mem, src, i, &valref);
if (code < 0)
return code;
if (r_has_type(&valref, t_integer))
dst[i] = (float)valref.value.intval;
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,466 | static int graybasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp;
float Gray, RGB[3];
*cont = 0;
*stage = 0;
check_op(1);
if (!r_has_type(op, t_integer)) {
if (r_has_type(op, t_real)) {
Gray = op->value.realval;
... | null | 0 | static int graybasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp;
float Gray, RGB[3];
*cont = 0;
*stage = 0;
check_op(1);
if (!r_has_type(op, t_integer)) {
if (r_has_type(op, t_real)) {
Gray = op->value.realval;
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,467 | static int graydomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ptr[0] = 0;
ptr[1] = 1;
return 0;
}
| null | 0 | static int graydomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ptr[0] = 0;
ptr[1] = 1;
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,468 | static int grayrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ptr[0] = 0;
ptr[1] = 1;
return 0;
}
| null | 0 | static int grayrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ptr[0] = 0;
ptr[1] = 1;
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,469 | static int grayvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error(gs_error_typecheck);
if (num_comps < 1)
return_error(gs_error_stackunderflow);
if (*values > 1.0)
*val... | null | 0 | static int grayvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error(gs_error_typecheck);
if (num_comps < 1)
return_error(gs_error_stackunderflow);
if (*values > 1.0)
*val... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,470 | static int hasharray(i_ctx_t * i_ctx_p, ref *m1, gs_md5_state_t *md5)
{
int i, code;
ref ref1;
for (i=0;i < r_size(m1);i++) {
code = array_get(imemory, m1, i, &ref1);
if (code < 0)
return 0;
code = r_type(&ref1);
if (code < 0)
return code;
sw... | null | 0 | static int hasharray(i_ctx_t * i_ctx_p, ref *m1, gs_md5_state_t *md5)
{
int i, code;
ref ref1;
for (i=0;i < r_size(m1);i++) {
code = array_get(imemory, m1, i, &ref1);
if (code < 0)
return 0;
code = r_type(&ref1);
if (code < 0)
return code;
sw... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,471 | static int hashciedefgspace(i_ctx_t *i_ctx_p, ref *space, gs_md5_state_t *md5)
{
/* If the problems mentioned above are resolved, then this code could
* be re-instated.
*/
int code = 0;
ref CIEdict1, spacename;
code = array_get(imemory, space, 0, &spacename);
if (code < 0)
return ... | null | 0 | static int hashciedefgspace(i_ctx_t *i_ctx_p, ref *space, gs_md5_state_t *md5)
{
/* If the problems mentioned above are resolved, then this code could
* be re-instated.
*/
int code = 0;
ref CIEdict1, spacename;
code = array_get(imemory, space, 0, &spacename);
if (code < 0)
return ... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,472 | static int hashciedefspace(i_ctx_t *i_ctx_p, ref *space, gs_md5_state_t *md5)
{
int code = 0;
ref CIEdict1, spacename;
code = array_get(imemory, space, 0, &spacename);
if (code < 0)
return 0;
gs_md5_append(md5, (const gs_md5_byte_t *)&spacename.value.pname, sizeof(spacename.value.pname));
... | null | 0 | static int hashciedefspace(i_ctx_t *i_ctx_p, ref *space, gs_md5_state_t *md5)
{
int code = 0;
ref CIEdict1, spacename;
code = array_get(imemory, space, 0, &spacename);
if (code < 0)
return 0;
gs_md5_append(md5, (const gs_md5_byte_t *)&spacename.value.pname, sizeof(spacename.value.pname));
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,473 | static int iccalternatespace(i_ctx_t * i_ctx_p, ref *space, ref **r, int *CIESubst)
{
int components, code = 0;
ref *tempref, ICCdict;
if (!r_is_array(space))
return_error(gs_error_typecheck);
/* Validate parameters, check we have enough operands */
if (r_size(space) != 2)
return_er... | null | 0 | static int iccalternatespace(i_ctx_t * i_ctx_p, ref *space, ref **r, int *CIESubst)
{
int components, code = 0;
ref *tempref, ICCdict;
if (!r_is_array(space))
return_error(gs_error_typecheck);
/* Validate parameters, check we have enough operands */
if (r_size(space) != 2)
return_er... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,474 | static int icccomponents(i_ctx_t * i_ctx_p, ref *space, int *n)
{
int code = 0;
ref *tempref, ICCdict;
code = array_get(imemory, space, 1, &ICCdict);
if (code < 0)
return code;
code = dict_find_string(&ICCdict, "N", &tempref);
if (code < 0)
return code;
if (code == 0)
... | null | 0 | static int icccomponents(i_ctx_t * i_ctx_p, ref *space, int *n)
{
int code = 0;
ref *tempref, ICCdict;
code = array_get(imemory, space, 1, &ICCdict);
if (code < 0)
return code;
code = dict_find_string(&ICCdict, "N", &tempref);
if (code < 0)
return code;
if (code == 0)
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,475 | static int iccdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int components, i, code = 0;
ref *tempref, ICCdict, valref;
code = array_get(imemory, space, 1, &ICCdict);
if (code < 0)
return code;
code = dict_find_string(&ICCdict, "N", &tempref);
if (code < 0)
return code;
... | null | 0 | static int iccdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int components, i, code = 0;
ref *tempref, ICCdict, valref;
code = array_get(imemory, space, 1, &ICCdict);
if (code < 0)
return code;
code = dict_find_string(&ICCdict, "N", &tempref);
if (code < 0)
return code;
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,476 | static int iccrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int components, i, code = 0;
ref *tempref, ICCdict, valref;
code = array_get(imemory, space, 1, &ICCdict);
if (code < 0)
return code;
code = dict_find_string(&ICCdict, "N", &tempref);
if (code < 0)
return code;
... | null | 0 | static int iccrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int components, i, code = 0;
ref *tempref, ICCdict, valref;
code = array_get(imemory, space, 1, &ICCdict);
if (code < 0)
return code;
code = dict_find_string(&ICCdict, "N", &tempref);
if (code < 0)
return code;
... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,477 | static int iccvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
return 0;
}
| null | 0 | static int iccvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,478 | indexed_cont(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
es_ptr ep = esp;
int i = (int)ep[csme_index].value.intval;
if (i >= 0) { /* i.e., not first time */
int m = (int)ep[csme_num_components].value.intval;
int code = float_params(op, m, &r_ptr(&ep[csme_map], gs_indexed_map)->values[i * m]);... | null | 0 | indexed_cont(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
es_ptr ep = esp;
int i = (int)ep[csme_index].value.intval;
if (i >= 0) { /* i.e., not first time */
int m = (int)ep[csme_num_components].value.intval;
int code = float_params(op, m, &r_ptr(&ep[csme_map], gs_indexed_map)->values[i * m]);... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,479 | static int indexedalternatespace(i_ctx_t * i_ctx_p, ref *space, ref **r, int *CIESubst)
{
ref alt;
int code;
code = array_get(imemory, *r, 1, &alt);
if (code < 0)
return code;
ref_assign(*r, &alt);
return 0;
}
| null | 0 | static int indexedalternatespace(i_ctx_t * i_ctx_p, ref *space, ref **r, int *CIESubst)
{
ref alt;
int code;
code = array_get(imemory, *r, 1, &alt);
if (code < 0)
return code;
ref_assign(*r, &alt);
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,480 | static int indexedbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
int code;
if (*stage == 0) {
/* Usefully /Indexed can't be the base of any other space, so we know
* the current space in the graphics state is this one.
*/
gs_color... | null | 0 | static int indexedbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
int code;
if (*stage == 0) {
/* Usefully /Indexed can't be the base of any other space, so we know
* the current space in the graphics state is this one.
*/
gs_color... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,481 | static int indexeddomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ref hival;
int code;
code = array_get(imemory, space, 2, &hival);
if (code < 0)
return code;
ptr[0] = 0;
ptr[1] = (float)hival.value.intval;
return 0;
}
| null | 0 | static int indexeddomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ref hival;
int code;
code = array_get(imemory, space, 2, &hival);
if (code < 0)
return code;
ptr[0] = 0;
ptr[1] = (float)hival.value.intval;
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,482 | static int indexedrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ref hival;
int code;
code = array_get(imemory, space, 2, &hival);
if (code < 0)
return code;
ptr[0] = 0;
ptr[1] = (float)hival.value.intval;
return 0;
}
| null | 0 | static int indexedrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ref hival;
int code;
code = array_get(imemory, space, 2, &hival);
if (code < 0)
return code;
ptr[0] = 0;
ptr[1] = (float)hival.value.intval;
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,483 | static int indexedvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
int code, integer;
float fraction;
ref hival;
os_ptr op = osp;
if (num_comps < 1)
return_error(gs_error_stackunderflow);
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_er... | null | 0 | static int indexedvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
int code, integer;
float fraction;
ref hival;
os_ptr op = osp;
if (num_comps < 1)
return_error(gs_error_stackunderflow);
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_er... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,484 | static int labbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op;
int i, components=1;
components = 3;
pop(components);
op = osp;
components = 3;
push(components);
op -= components-1;
for (i=0;i<components;i++) {
make_real... | null | 0 | static int labbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op;
int i, components=1;
components = 3;
pop(components);
op = osp;
components = 3;
push(components);
op -= components-1;
for (i=0;i<components;i++) {
make_real... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,485 | static int labdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, code;
ref CIEdict, *tempref, valref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a Range, get the values from that */
code = dict_find_string(&CIEdict, "Range", &tem... | null | 0 | static int labdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, code;
ref CIEdict, *tempref, valref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a Range, get the values from that */
code = dict_find_string(&CIEdict, "Range", &tem... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,486 | static int labrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, code;
ref CIEdict, *tempref, valref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a Range entry, get the values from that */
code = dict_find_string(&CIEdict, "Range",... | null | 0 | static int labrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i, code;
ref CIEdict, *tempref, valref;
code = array_get(imemory, space, 1, &CIEdict);
if (code < 0)
return code;
/* If we have a Range entry, get the values from that */
code = dict_find_string(&CIEdict, "Range",... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,487 | static int onecomponent(i_ctx_t * i_ctx_p, ref *space, int *n)
{
*n = 1;
return 0;
}
| null | 0 | static int onecomponent(i_ctx_t * i_ctx_p, ref *space, int *n)
{
*n = 1;
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,488 | static int patternbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op;
int i, components=0;
if (r_size(space) > 1) {
const gs_color_space * pcs = gs_currentcolorspace(igs);
const gs_client_color * pcc = gs_currentcolor(igs);
int ... | null | 0 | static int patternbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op;
int i, components=0;
if (r_size(space) > 1) {
const gs_color_space * pcs = gs_currentcolorspace(igs);
const gs_client_color * pcc = gs_currentcolor(igs);
int ... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,489 | static int patterncomponent(i_ctx_t * i_ctx_p, ref *space, int *n)
{
os_ptr op = osp;
int n_comps, code;
const gs_color_space * pcs = gs_currentcolorspace(igs);
gs_client_color cc;
/* check for a pattern color space */
if ((n_comps = cs_num_components(pcs)) < 0) {
n_comps = -n_... | null | 0 | static int patterncomponent(i_ctx_t * i_ctx_p, ref *space, int *n)
{
os_ptr op = osp;
int n_comps, code;
const gs_color_space * pcs = gs_currentcolorspace(igs);
gs_client_color cc;
/* check for a pattern color space */
if ((n_comps = cs_num_components(pcs)) < 0) {
n_comps = -n_... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,490 | static int patternvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
check_op(1);
if (!r_has_type(op, t_dictionary) && !r_has_type(op, t_null))
return_error(gs_error_typecheck);
return 0;
}
| null | 0 | static int patternvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
check_op(1);
if (!r_has_type(op, t_dictionary) && !r_has_type(op, t_null))
return_error(gs_error_typecheck);
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,491 | static int rgbbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp;
float RGB[3], CMYK[4], Gray, UCR, BG;
int i;
const gs_color_space * pcs = gs_currentcolorspace(igs);
if (pcs->id == cs_DeviceGray_id) {
/* UGLY hack. Its possible fo... | null | 0 | static int rgbbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp;
float RGB[3], CMYK[4], Gray, UCR, BG;
int i;
const gs_color_space * pcs = gs_currentcolorspace(igs);
if (pcs->id == cs_DeviceGray_id) {
/* UGLY hack. Its possible fo... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,492 | static int rgbdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i;
for (i = 0;i < 6;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;
}
return 0;
}
| null | 0 | static int rgbdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i;
for (i = 0;i < 6;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;
}
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,493 | static int rgbrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i;
for (i = 0;i < 6;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;
}
return 0;
}
| null | 0 | static int rgbrange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
int i;
for (i = 0;i < 6;i+=2) {
ptr[i] = 0;
ptr[i+1] = 1;
}
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,494 | static int rgbvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
int i;
if (num_comps < 3)
return_error(gs_error_stackunderflow);
op -= 2;
for (i=0;i<3;i++) {
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error(gs... | null | 0 | static int rgbvalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
int i;
if (num_comps < 3)
return_error(gs_error_stackunderflow);
op -= 2;
for (i=0;i<3;i++) {
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error(gs... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,495 | static int sepbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp; /* required by "push" macro */
int use, code;
code = septransform(i_ctx_p, space, &use, stage, stack_depth);
if (code != 0)
return code;
if (!use) {... | null | 0 | static int sepbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth)
{
os_ptr op = osp; /* required by "push" macro */
int use, code;
code = septransform(i_ctx_p, space, &use, stage, stack_depth);
if (code != 0)
return code;
if (!use) {... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,496 | static int sepcompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
ref sname1, sname2;
int code;
code = array_get(imemory, space, 1, &sname1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &sname2);
if (code < 0)
return 0;
if (r_type(&sname1) != r_... | null | 0 | static int sepcompareproc(i_ctx_t *i_ctx_p, ref *space, ref *testspace)
{
ref sname1, sname2;
int code;
code = array_get(imemory, space, 1, &sname1);
if (code < 0)
return 0;
code = array_get(imemory, testspace, 1, &sname2);
if (code < 0)
return 0;
if (r_type(&sname1) != r_... | @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,497 | static int sepdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ptr[0] = 0;
ptr[1] = 1;
return 0;
}
| null | 0 | static int sepdomain(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ptr[0] = 0;
ptr[1] = 1;
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,498 | static int sepinitialproc(i_ctx_t *i_ctx_p, ref *space)
{
gs_client_color cc;
cc.pattern = 0x00;
cc.paint.values[0] = 1.0;
return gs_setcolor(igs, &cc);
}
| null | 0 | static int sepinitialproc(i_ctx_t *i_ctx_p, ref *space)
{
gs_client_color cc;
cc.pattern = 0x00;
cc.paint.values[0] = 1.0;
return gs_setcolor(igs, &cc);
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
2,499 | static int seprange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ptr[0] = 0;
ptr[1] = 1;
return 0;
}
| null | 0 | static int seprange(i_ctx_t * i_ctx_p, ref *space, float *ptr)
{
ptr[0] = 0;
ptr[1] = 1;
return 0;
}
| @@ -283,8 +283,9 @@ zsetcolor(i_ctx_t * i_ctx_p)
if (r_has_type(op, t_dictionary)) {
ref *pImpl, pPatInst;
- code = dict_find_string(op, "Implementation", &pImpl);
- if (code != 0) {
+ if ((code = dict_find_string(op, "Implementation", &pImpl)) < 0)
+ ... | CWE-704 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.