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,200 | check_mandatory_fields (DBusHeader *header)
{
#define REQUIRE_FIELD(name) do { if (header->fields[DBUS_HEADER_FIELD_##name].value_pos < 0) return DBUS_INVALID_MISSING_##name; } while (0)
switch (_dbus_header_get_message_type (header))
{
case DBUS_MESSAGE_TYPE_SIGNAL:
REQUIRE_FIELD (INTERFACE);
/*... | DoS +Info | 0 | check_mandatory_fields (DBusHeader *header)
{
#define REQUIRE_FIELD(name) do { if (header->fields[DBUS_HEADER_FIELD_##name].value_pos < 0) return DBUS_INVALID_MISSING_##name; } while (0)
switch (_dbus_header_get_message_type (header))
{
case DBUS_MESSAGE_TYPE_SIGNAL:
REQUIRE_FIELD (INTERFACE);
/*... | @@ -1468,14 +1468,20 @@ void
_dbus_header_byteswap (DBusHeader *header,
int new_order)
{
+ unsigned char byte_order;
+
if (header->byte_order == new_order)
return;
+ byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET);
+ _dbus_assert (header->byte_order =... | CWE-20 | null | null |
2,201 | correct_header_padding (DBusHeader *header)
{
int unpadded_len;
_dbus_assert (header->padding == 7);
_dbus_string_shorten (&header->data, header->padding);
unpadded_len = _dbus_string_get_length (&header->data);
if (!_dbus_string_align_length (&header->data, 8))
_dbus_assert_not_reached ("couldn't pad ... | DoS +Info | 0 | correct_header_padding (DBusHeader *header)
{
int unpadded_len;
_dbus_assert (header->padding == 7);
_dbus_string_shorten (&header->data, header->padding);
unpadded_len = _dbus_string_get_length (&header->data);
if (!_dbus_string_align_length (&header->data, 8))
_dbus_assert_not_reached ("couldn't pad ... | @@ -1468,14 +1468,20 @@ void
_dbus_header_byteswap (DBusHeader *header,
int new_order)
{
+ unsigned char byte_order;
+
if (header->byte_order == new_order)
return;
+ byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET);
+ _dbus_assert (header->byte_order =... | CWE-20 | null | null |
2,202 | find_field_for_modification (DBusHeader *header,
int field,
DBusTypeReader *reader,
DBusTypeReader *realign_root)
{
dbus_bool_t retval;
retval = FALSE;
_dbus_type_reader_init (realign_root,
... | DoS +Info | 0 | find_field_for_modification (DBusHeader *header,
int field,
DBusTypeReader *reader,
DBusTypeReader *realign_root)
{
dbus_bool_t retval;
retval = FALSE;
_dbus_type_reader_init (realign_root,
... | @@ -1468,14 +1468,20 @@ void
_dbus_header_byteswap (DBusHeader *header,
int new_order)
{
+ unsigned char byte_order;
+
if (header->byte_order == new_order)
return;
+ byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET);
+ _dbus_assert (header->byte_order =... | CWE-20 | null | null |
2,203 | set_basic_field (DBusTypeReader *reader,
int field,
int type,
const void *value,
const DBusTypeReader *realign_root)
{
DBusTypeReader sub;
DBusTypeReader variant;
_dbus_type_reader_recurse (rea... | DoS +Info | 0 | set_basic_field (DBusTypeReader *reader,
int field,
int type,
const void *value,
const DBusTypeReader *realign_root)
{
DBusTypeReader sub;
DBusTypeReader variant;
_dbus_type_reader_recurse (rea... | @@ -1468,14 +1468,20 @@ void
_dbus_header_byteswap (DBusHeader *header,
int new_order)
{
+ unsigned char byte_order;
+
if (header->byte_order == new_order)
return;
+ byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET);
+ _dbus_assert (header->byte_order =... | CWE-20 | null | null |
2,204 | load_and_validate_field (DBusHeader *header,
int field,
DBusTypeReader *variant_reader)
{
int type;
int expected_type;
const DBusString *value_str;
int value_pos;
int str_data_pos;
dbus_uint32_t v_UINT32;
int bad_string_code;
dbus_bool_t ... | DoS +Info | 0 | load_and_validate_field (DBusHeader *header,
int field,
DBusTypeReader *variant_reader)
{
int type;
int expected_type;
const DBusString *value_str;
int value_pos;
int str_data_pos;
dbus_uint32_t v_UINT32;
int bad_string_code;
dbus_bool_t ... | @@ -1462,14 +1462,20 @@ void
_dbus_header_byteswap (DBusHeader *header,
int new_order)
{
+ unsigned char byte_order;
+
if (header->byte_order == new_order)
return;
+ byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET);
+ _dbus_assert (header->byte_order =... | CWE-20 | null | null |
2,205 | errorexec_cleanup(i_ctx_t *i_ctx_p)
{
return 0;
}
| null | 0 | errorexec_cleanup(i_ctx_t *i_ctx_p)
{
return 0;
}
| @@ -661,16 +661,28 @@ again:
return code;
if (gs_errorname(i_ctx_p, code, &error_name) < 0)
return code; /* out-of-range error code! */
- /*
- * For greater Adobe compatibility, only the standard PostScript errors
- * are defined in errordict; the rest are in gserrordict.
+
... | CWE-20 | null | null |
2,206 | errorexec_find(i_ctx_t *i_ctx_p, ref *perror_object)
{
long i;
const ref *ep;
for (i = 0; (ep = ref_stack_index(&e_stack, i)) != 0; ++i) {
if (r_is_estack_mark(ep)) {
if (ep->value.opproc == oparray_cleanup) {
/* See oppr: above. */
uint opindex = (uint)e... | null | 0 | errorexec_find(i_ctx_t *i_ctx_p, ref *perror_object)
{
long i;
const ref *ep;
for (i = 0; (ep = ref_stack_index(&e_stack, i)) != 0; ++i) {
if (r_is_estack_mark(ep)) {
if (ep->value.opproc == oparray_cleanup) {
/* See oppr: above. */
uint opindex = (uint)e... | @@ -661,16 +661,28 @@ again:
return code;
if (gs_errorname(i_ctx_p, code, &error_name) < 0)
return code; /* out-of-range error code! */
- /*
- * For greater Adobe compatibility, only the standard PostScript errors
- * are defined in errordict; the rest are in gserrordict.
+
... | CWE-20 | null | null |
2,207 | errorexec_pop(i_ctx_t *i_ctx_p)
{
esp -= 2;
return o_pop_estack;
}
| null | 0 | errorexec_pop(i_ctx_t *i_ctx_p)
{
esp -= 2;
return o_pop_estack;
}
| @@ -661,16 +661,28 @@ again:
return code;
if (gs_errorname(i_ctx_p, code, &error_name) < 0)
return code; /* out-of-range error code! */
- /*
- * For greater Adobe compatibility, only the standard PostScript errors
- * are defined in errordict; the rest are in gserrordict.
+
... | CWE-20 | null | null |
2,208 | Class2Modem::Class2Modem(FaxServer& s, const ModemConfig& c) : FaxModem(s,c)
{
hangupCode[0] = '\0';
serviceType = 0; // must be set in derived class
useExtendedDF = false; // T.32 Amendment 1 extension for data format is detectable
useJP = false; // JP +FCC option support is detectable
imagefd... | Exec Code | 0 | Class2Modem::Class2Modem(FaxServer& s, const ModemConfig& c) : FaxModem(s,c)
{
hangupCode[0] = '\0';
serviceType = 0; // must be set in derived class
useExtendedDF = false; // T.32 Amendment 1 extension for data format is detectable
useJP = false; // JP +FCC option support is detectable
imagefd... | @@ -485,6 +485,15 @@ Class2Modem::parseClass2Capabilities(const char* cap, Class2Params& params, bool
} else {
if (jpscan == 0x1) params.jp = JP_GREY;
else if (jpscan & 0x2) params.jp = JP_COLOR;
+ /*
+ * ITU T.30 does not specify that bits 16 (MR) or 31 (MMR) must b... | CWE-20 | null | null |
2,209 | FaxModem::initializeDecoder(const Class2Params& params)
{
setupDecoder(recvFillOrder, params.is2D(), (params.df == DF_2DMMR));
u_int rowpixels = params.pageWidth(); // NB: assume rowpixels <= 4864
tiff_runlen_t runs[2*4864]; // run arrays for cur+ref rows
setRuns(runs, runs+4864, rowpixels);
setI... | Exec Code | 0 | FaxModem::initializeDecoder(const Class2Params& params)
{
setupDecoder(recvFillOrder, params.is2D(), (params.df == DF_2DMMR));
u_int rowpixels = params.pageWidth(); // NB: assume rowpixels <= 4864
tiff_runlen_t runs[2*4864]; // run arrays for cur+ref rows
setRuns(runs, runs+4864, rowpixels);
setI... | @@ -38,6 +38,7 @@
#include <ctype.h>
#define RCVBUFSIZ (32*1024) // XXX
+#define COLORBUFSIZ (2000*1024) // 1MB is not big enough
static void setupCompression(TIFF*, u_int, u_int, uint32);
@@ -356,7 +357,7 @@ FaxModem::recvPageDLEData(TIFF* tif, bool checkQuali... | CWE-20 | null | null |
2,210 | FaxModem::recvEndPage(TIFF* tif, const Class2Params& params)
{
/*
* FAXRECVPARAMS is limited to a 32-bit value, and as that is quite
* limited in comparison to all possible fax parameters, FAXDCS is
* intended to be used to discern most fax parameters. The DCS
* signal, however, does not contai... | Exec Code | 0 | FaxModem::recvEndPage(TIFF* tif, const Class2Params& params)
{
/*
* FAXRECVPARAMS is limited to a 32-bit value, and as that is quite
* limited in comparison to all possible fax parameters, FAXDCS is
* intended to be used to discern most fax parameters. The DCS
* signal, however, does not contai... | @@ -38,6 +38,7 @@
#include <ctype.h>
#define RCVBUFSIZ (32*1024) // XXX
+#define COLORBUFSIZ (2000*1024) // 1MB is not big enough
static void setupCompression(TIFF*, u_int, u_int, uint32);
@@ -356,7 +357,7 @@ FaxModem::recvPageDLEData(TIFF* tif, bool checkQuali... | CWE-20 | null | null |
2,211 | z2grestoreall(i_ctx_t *i_ctx_p)
{
for (;;) {
if (!restore_page_device(igs, gs_gstate_saved(igs))) {
bool done = !gs_gstate_saved(gs_gstate_saved(igs));
gs_grestore(igs);
if (done)
break;
} else
return push_callout(i_ctx_p, "%grestoreal... | Exec Code Bypass | 0 | z2grestoreall(i_ctx_t *i_ctx_p)
{
for (;;) {
if (!restore_page_device(igs, gs_gstate_saved(igs))) {
bool done = !gs_gstate_saved(gs_gstate_saved(igs));
gs_grestore(igs);
if (done)
break;
} else
return push_callout(i_ctx_p, "%grestoreal... | @@ -312,6 +312,9 @@ z2grestoreall(i_ctx_t *i_ctx_p)
static int
z2restore(i_ctx_t *i_ctx_p)
{
+ os_ptr op = osp;
+ check_type(*op, t_save);
+
while (gs_gstate_saved(gs_gstate_saved(igs))) {
if (restore_page_device(igs, gs_gstate_saved(igs)))
return push_callout(i_ctx_p, "%restore1page... | CWE-78 | null | null |
2,212 | static RELOC_PTRS_WITH(device_forward_reloc_ptrs, gx_device_forward *fdev)
{
fdev->target = gx_device_reloc_ptr(fdev->target, gcst);
}
| Exec Code Bypass | 0 | static RELOC_PTRS_WITH(device_forward_reloc_ptrs, gx_device_forward *fdev)
{
fdev->target = gx_device_reloc_ptr(fdev->target, gcst);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,213 | gs_closedevice(gx_device * dev)
{
int code = 0;
if (dev->is_open) {
code = (*dev_proc(dev, close_device))(dev);
dev->is_open = false;
if (code < 0)
return_error(code);
}
return code;
}
| Exec Code Bypass | 0 | gs_closedevice(gx_device * dev)
{
int code = 0;
if (dev->is_open) {
code = (*dev_proc(dev, close_device))(dev);
dev->is_open = false;
if (code < 0)
return_error(code);
}
return code;
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,214 | gs_copydevice(gx_device ** pnew_dev, const gx_device * dev, gs_memory_t * mem)
{
return gs_copydevice2(pnew_dev, dev, false, mem);
}
| Exec Code Bypass | 0 | gs_copydevice(gx_device ** pnew_dev, const gx_device * dev, gs_memory_t * mem)
{
return gs_copydevice2(pnew_dev, dev, false, mem);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,215 | gs_copydevice2(gx_device ** pnew_dev, const gx_device * dev, bool keep_open,
gs_memory_t * mem)
{
gx_device *new_dev;
const gs_memory_struct_type_t *std = dev->stype;
const gs_memory_struct_type_t *new_std;
gs_memory_struct_type_t *a_std = 0;
int code;
if (dev->stype_is_dynamic) ... | Exec Code Bypass | 0 | gs_copydevice2(gx_device ** pnew_dev, const gx_device * dev, bool keep_open,
gs_memory_t * mem)
{
gx_device *new_dev;
const gs_memory_struct_type_t *std = dev->stype;
const gs_memory_struct_type_t *new_std;
gs_memory_struct_type_t *a_std = 0;
int code;
if (dev->stype_is_dynamic) ... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,216 | gs_copyscanlines(gx_device * dev, int start_y, byte * data, uint size,
int *plines_copied, uint * pbytes_copied)
{
uint line_size = gx_device_raster(dev, 0);
uint count = size / line_size;
uint i;
byte *dest = data;
for (i = 0; i < count; i++, dest += line_size) {
int code ... | Exec Code Bypass | 0 | gs_copyscanlines(gx_device * dev, int start_y, byte * data, uint size,
int *plines_copied, uint * pbytes_copied)
{
uint line_size = gx_device_raster(dev, 0);
uint count = size / line_size;
uint i;
byte *dest = data;
for (i = 0; i < count; i++, dest += line_size) {
int code ... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,217 | gs_currentdevice(const gs_gstate * pgs)
{
return pgs->device;
}
| Exec Code Bypass | 0 | gs_currentdevice(const gs_gstate * pgs)
{
return pgs->device;
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,218 | gs_deviceinitialmatrix(gx_device * dev, gs_matrix * pmat)
{
fill_dev_proc(dev, get_initial_matrix, gx_default_get_initial_matrix);
(*dev_proc(dev, get_initial_matrix)) (dev, pmat);
}
| Exec Code Bypass | 0 | gs_deviceinitialmatrix(gx_device * dev, gs_matrix * pmat)
{
fill_dev_proc(dev, get_initial_matrix, gx_default_get_initial_matrix);
(*dev_proc(dev, get_initial_matrix)) (dev, pmat);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,219 | gs_devicename(const gx_device * dev)
{
return dev->dname;
}
| Exec Code Bypass | 0 | gs_devicename(const gx_device * dev)
{
return dev->dname;
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,220 | gs_flushpage(gs_gstate * pgs)
{
gx_device *dev = gs_currentdevice(pgs);
return (*dev_proc(dev, sync_output)) (dev);
}
| Exec Code Bypass | 0 | gs_flushpage(gs_gstate * pgs)
{
gx_device *dev = gs_currentdevice(pgs);
return (*dev_proc(dev, sync_output)) (dev);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,221 | gs_getdefaultdevice(void)
{
return gs_getdefaultlibdevice(NULL);
}
| Exec Code Bypass | 0 | gs_getdefaultdevice(void)
{
return gs_getdefaultlibdevice(NULL);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,222 | gs_getdefaultlibdevice(gs_memory_t *mem)
{
const gx_device *const *list;
int count = gs_lib_device_list(&list, NULL);
const char *name, *end, *fin;
int i;
/* Search the compiled in device list for a known device name */
/* In the case the lib ctx hasn't been initialised */
if (mem && mem->g... | Exec Code Bypass | 0 | gs_getdefaultlibdevice(gs_memory_t *mem)
{
const gx_device *const *list;
int count = gs_lib_device_list(&list, NULL);
const char *name, *end, *fin;
int i;
/* Search the compiled in device list for a known device name */
/* In the case the lib ctx hasn't been initialised */
if (mem && mem->g... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,223 | gs_getdevice(int index)
{
const gx_device *const *list;
int count = gs_lib_device_list(&list, NULL);
if (index < 0 || index >= count)
return 0; /* index out of range */
return list[index];
}
| Exec Code Bypass | 0 | gs_getdevice(int index)
{
const gx_device *const *list;
int count = gs_lib_device_list(&list, NULL);
if (index < 0 || index >= count)
return 0; /* index out of range */
return list[index];
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,224 | gs_gstate_putdeviceparams(gs_gstate *pgs, gx_device *dev, gs_param_list *plist)
{
int code;
gx_device *dev2;
if (dev)
dev2 = dev;
else
dev2 = pgs->device;
code = gs_putdeviceparams(dev2, plist);
if (code >= 0)
gs_gstate_update_device(pgs, dev2);
return code;
}
| Exec Code Bypass | 0 | gs_gstate_putdeviceparams(gs_gstate *pgs, gx_device *dev, gs_param_list *plist)
{
int code;
gx_device *dev2;
if (dev)
dev2 = dev;
else
dev2 = pgs->device;
code = gs_putdeviceparams(dev2, plist);
if (code >= 0)
gs_gstate_update_device(pgs, dev2);
return code;
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,225 | gs_gstate_update_device(gs_gstate *pgs, gx_device *dev)
{
gx_set_cmap_procs(pgs, dev);
gx_unset_both_dev_colors(pgs);
}
| Exec Code Bypass | 0 | gs_gstate_update_device(gs_gstate *pgs, gx_device *dev)
{
gx_set_cmap_procs(pgs, dev);
gx_unset_both_dev_colors(pgs);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,226 | bool gs_is_null_device(gx_device *dev)
{
/* Assuming null_fill_path isn't used elswhere. */
return dev->procs.fill_path == gs_null_device.procs.fill_path;
}
| Exec Code Bypass | 0 | bool gs_is_null_device(gx_device *dev)
{
/* Assuming null_fill_path isn't used elswhere. */
return dev->procs.fill_path == gs_null_device.procs.fill_path;
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,227 | gs_make_null_device(gx_device_null *dev_null, gx_device *dev,
gs_memory_t * mem)
{
gx_device_init((gx_device *)dev_null, (const gx_device *)&gs_null_device,
mem, true);
gx_device_set_target((gx_device_forward *)dev_null, dev);
if (dev) {
/* The gx_device_copy_c... | Exec Code Bypass | 0 | gs_make_null_device(gx_device_null *dev_null, gx_device *dev,
gs_memory_t * mem)
{
gx_device_init((gx_device *)dev_null, (const gx_device *)&gs_null_device,
mem, true);
gx_device_set_target((gx_device_forward *)dev_null, dev);
if (dev) {
/* The gx_device_copy_c... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,228 | gs_opendevice(gx_device *dev)
{
if (dev->is_open)
return 0;
check_device_separable(dev);
gx_device_fill_in_procs(dev);
{
int code = (*dev_proc(dev, open_device))(dev);
if (code < 0)
return_error(code);
dev->is_open = true;
return 1;
}
}
| Exec Code Bypass | 0 | gs_opendevice(gx_device *dev)
{
if (dev->is_open)
return 0;
check_device_separable(dev);
gx_device_fill_in_procs(dev);
{
int code = (*dev_proc(dev, open_device))(dev);
if (code < 0)
return_error(code);
dev->is_open = true;
return 1;
}
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,229 | gs_output_page(gs_gstate * pgs, int num_copies, int flush)
{
gx_device *dev = gs_currentdevice(pgs);
cmm_dev_profile_t *dev_profile;
int code;
/* for devices that hook 'fill_path' in order to pick up gs_gstate */
/* values such as dev_ht (such as tiffsep1), make a dummy call here */
/* to mak... | Exec Code Bypass | 0 | gs_output_page(gs_gstate * pgs, int num_copies, int flush)
{
gx_device *dev = gs_currentdevice(pgs);
cmm_dev_profile_t *dev_profile;
int code;
/* for devices that hook 'fill_path' in order to pick up gs_gstate */
/* values such as dev_ht (such as tiffsep1), make a dummy call here */
/* to mak... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,230 | gs_setdevice_no_init(gs_gstate * pgs, gx_device * dev)
{
/*
* Just set the device, possibly changing color space but no other
* device parameters.
*
* Make sure we don't close the device if dev == pgs->device
* This could be done by allowing the rc_assign to close the
* old 'dev' if th... | Exec Code Bypass | 0 | gs_setdevice_no_init(gs_gstate * pgs, gx_device * dev)
{
/*
* Just set the device, possibly changing color space but no other
* device parameters.
*
* Make sure we don't close the device if dev == pgs->device
* This could be done by allowing the rc_assign to close the
* old 'dev' if th... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,231 | bool gx_color_info_equal(const gx_device_color_info * p1, const gx_device_color_info * p2)
{
if (p1->anti_alias.graphics_bits != p2->anti_alias.graphics_bits)
return false;
if (p1->anti_alias.text_bits != p2->anti_alias.text_bits)
return false;
if (p1->black_component != p2->black_component)... | Exec Code Bypass | 0 | bool gx_color_info_equal(const gx_device_color_info * p1, const gx_device_color_info * p2)
{
if (p1->anti_alias.graphics_bits != p2->anti_alias.graphics_bits)
return false;
if (p1->anti_alias.text_bits != p2->anti_alias.text_bits)
return false;
if (p1->black_component != p2->black_component)... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,232 | gx_device_adjust_resolution(gx_device * dev,
int actual_width, int actual_height, int fit)
{
double width_ratio = (double)actual_width / dev->width;
double height_ratio = (double)actual_height / dev->height;
double ratio =
(fit ? min(width_ratio, height_ratio) :
max(widt... | Exec Code Bypass | 0 | gx_device_adjust_resolution(gx_device * dev,
int actual_width, int actual_height, int fit)
{
double width_ratio = (double)actual_width / dev->width;
double height_ratio = (double)actual_height / dev->height;
double ratio =
(fit ? min(width_ratio, height_ratio) :
max(widt... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,233 | gx_device_close_output_file(const gx_device * dev, const char *fname,
FILE *file)
{
gs_parsed_file_name_t parsed;
const char *fmt;
int code = gx_parse_output_file_name(&parsed, &fmt, fname, strlen(fname),
dev->memory);
if (code < 0)
... | Exec Code Bypass | 0 | gx_device_close_output_file(const gx_device * dev, const char *fname,
FILE *file)
{
gs_parsed_file_name_t parsed;
const char *fmt;
int code = gx_parse_output_file_name(&parsed, &fmt, fname, strlen(fname),
dev->memory);
if (code < 0)
... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,234 | gx_device_copy_color_params(gx_device *dev, const gx_device *target)
{
COPY_PARAM(color_info);
COPY_PARAM(cached_colors);
gx_device_copy_color_procs(dev, target);
}
| Exec Code Bypass | 0 | gx_device_copy_color_params(gx_device *dev, const gx_device *target)
{
COPY_PARAM(color_info);
COPY_PARAM(cached_colors);
gx_device_copy_color_procs(dev, target);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,235 | int gx_device_delete_output_file(const gx_device * dev, const char *fname)
{
gs_parsed_file_name_t parsed;
const char *fmt;
char *pfname = (char *)gs_alloc_bytes(dev->memory, gp_file_name_sizeof, "gx_device_delete_output_file(pfname)");
int code;
if (pfname == NULL) {
code = gs_note_error(g... | Exec Code Bypass | 0 | int gx_device_delete_output_file(const gx_device * dev, const char *fname)
{
gs_parsed_file_name_t parsed;
const char *fmt;
char *pfname = (char *)gs_alloc_bytes(dev->memory, gp_file_name_sizeof, "gx_device_delete_output_file(pfname)");
int code;
if (pfname == NULL) {
code = gs_note_error(g... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,236 | gx_device_enum_ptr(gx_device * dev)
{
if (dev == 0 || dev->memory == 0)
return 0;
return dev;
}
| Exec Code Bypass | 0 | gx_device_enum_ptr(gx_device * dev)
{
if (dev == 0 || dev->memory == 0)
return 0;
return dev;
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,237 | gx_device_finalize(const gs_memory_t *cmem, void *vptr)
{
gx_device * const dev = (gx_device *)vptr;
(void)cmem; /* unused */
if (dev->icc_struct != NULL) {
rc_decrement(dev->icc_struct, "gx_device_finalize(icc_profile)");
}
if (dev->finalize)
dev->finalize(dev);
/* Deal with s... | Exec Code Bypass | 0 | gx_device_finalize(const gs_memory_t *cmem, void *vptr)
{
gx_device * const dev = (gx_device *)vptr;
(void)cmem; /* unused */
if (dev->icc_struct != NULL) {
rc_decrement(dev->icc_struct, "gx_device_finalize(icc_profile)");
}
if (dev->finalize)
dev->finalize(dev);
/* Deal with s... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,238 | gx_device_free_local(gx_device *dev)
{
gx_device_finalize(dev->memory, dev);
}
| Exec Code Bypass | 0 | gx_device_free_local(gx_device *dev)
{
gx_device_finalize(dev->memory, dev);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,239 | gx_device_init(gx_device * dev, const gx_device * proto, gs_memory_t * mem,
bool internal)
{
memcpy(dev, proto, proto->params_size);
dev->memory = mem;
dev->retained = !internal;
rc_init(dev, mem, (internal ? 0 : 1));
rc_increment(dev->icc_struct);
}
| Exec Code Bypass | 0 | gx_device_init(gx_device * dev, const gx_device * proto, gs_memory_t * mem,
bool internal)
{
memcpy(dev, proto, proto->params_size);
dev->memory = mem;
dev->retained = !internal;
rc_init(dev, mem, (internal ? 0 : 1));
rc_increment(dev->icc_struct);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,240 | gx_device_init_on_stack(gx_device * dev, const gx_device * proto,
gs_memory_t * mem)
{
memcpy(dev, proto, proto->params_size);
dev->memory = mem;
dev->retained = 0;
dev->pad = proto->pad;
dev->log2_align_mod = proto->log2_align_mod;
dev->is_planar = proto->is_planar;
... | Exec Code Bypass | 0 | gx_device_init_on_stack(gx_device * dev, const gx_device * proto,
gs_memory_t * mem)
{
memcpy(dev, proto, proto->params_size);
dev->memory = mem;
dev->retained = 0;
dev->pad = proto->pad;
dev->log2_align_mod = proto->log2_align_mod;
dev->is_planar = proto->is_planar;
... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,241 | gx_device_make_struct_type(gs_memory_struct_type_t *st,
const gx_device *dev)
{
if (dev->stype)
*st = *dev->stype;
else if (dev_proc(dev, get_xfont_procs) == gx_forward_get_xfont_procs)
*st = st_device_forward;
else
*st = st_device;
st->ssize = dev->par... | Exec Code Bypass | 0 | gx_device_make_struct_type(gs_memory_struct_type_t *st,
const gx_device *dev)
{
if (dev->stype)
*st = *dev->stype;
else if (dev_proc(dev, get_xfont_procs) == gx_forward_get_xfont_procs)
*st = st_device_forward;
else
*st = st_device;
st->ssize = dev->par... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,242 | gx_device_raster(const gx_device * dev, bool pad)
{
ulong bits = (ulong) dev->width * dev->color_info.depth;
ulong raster;
int l2align;
if (dev->is_planar)
bits /= dev->color_info.num_components;
raster = (uint)((bits + 7) >> 3);
if (!pad)
return raster;
l2align = dev->log2... | Exec Code Bypass | 0 | gx_device_raster(const gx_device * dev, bool pad)
{
ulong bits = (ulong) dev->width * dev->color_info.depth;
ulong raster;
int l2align;
if (dev->is_planar)
bits /= dev->color_info.num_components;
raster = (uint)((bits + 7) >> 3);
if (!pad)
return raster;
l2align = dev->log2... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,243 | gx_device_raster_chunky(const gx_device * dev, bool pad)
{
ulong bits = (ulong) dev->width * dev->color_info.depth;
ulong raster;
int l2align;
raster = (uint)((bits + 7) >> 3);
if (!pad)
return raster;
l2align = dev->log2_align_mod;
if (l2align < log2_align_bitmap_mod)
l2ali... | Exec Code Bypass | 0 | gx_device_raster_chunky(const gx_device * dev, bool pad)
{
ulong bits = (ulong) dev->width * dev->color_info.depth;
ulong raster;
int l2align;
raster = (uint)((bits + 7) >> 3);
if (!pad)
return raster;
l2align = dev->log2_align_mod;
if (l2align < log2_align_bitmap_mod)
l2ali... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,244 | gx_device_raster_plane(const gx_device * dev, const gx_render_plane_t *render_plane)
{
ulong bpc = (render_plane && render_plane->index >= 0 ?
render_plane->depth : dev->color_info.depth/(dev->is_planar ? dev->color_info.num_components : 1));
ulong bits = (ulong) dev->width * bpc;
int l2align;
... | Exec Code Bypass | 0 | gx_device_raster_plane(const gx_device * dev, const gx_render_plane_t *render_plane)
{
ulong bpc = (render_plane && render_plane->index >= 0 ?
render_plane->depth : dev->color_info.depth/(dev->is_planar ? dev->color_info.num_components : 1));
ulong bits = (ulong) dev->width * bpc;
int l2align;
... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,245 | gx_device_reloc_ptr(gx_device * dev, gc_state_t * gcst)
{
if (dev == 0 || dev->memory == 0)
return dev;
return RELOC_OBJ(dev); /* gcst implicit */
}
| Exec Code Bypass | 0 | gx_device_reloc_ptr(gx_device * dev, gc_state_t * gcst)
{
if (dev == 0 || dev->memory == 0)
return dev;
return RELOC_OBJ(dev); /* gcst implicit */
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,246 | gx_device_retain(gx_device *dev, bool retained)
{
int delta = (int)retained - (int)dev->retained;
if (delta) {
dev->retained = retained; /* do first in case dev is freed */
rc_adjust_only(dev, delta, "gx_device_retain");
}
}
| Exec Code Bypass | 0 | gx_device_retain(gx_device *dev, bool retained)
{
int delta = (int)retained - (int)dev->retained;
if (delta) {
dev->retained = retained; /* do first in case dev is freed */
rc_adjust_only(dev, delta, "gx_device_retain");
}
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,247 | gx_device_set_hwsize_from_media(gx_device *dev)
{
int rot = (dev->LeadingEdge & 1);
double rot_media_x = rot ? dev->MediaSize[1] : dev->MediaSize[0];
double rot_media_y = rot ? dev->MediaSize[0] : dev->MediaSize[1];
dev->width = (int)(rot_media_x * dev->HWResolution[0] / 72.0 + 0.5);
dev->height = ... | Exec Code Bypass | 0 | gx_device_set_hwsize_from_media(gx_device *dev)
{
int rot = (dev->LeadingEdge & 1);
double rot_media_x = rot ? dev->MediaSize[1] : dev->MediaSize[0];
double rot_media_y = rot ? dev->MediaSize[0] : dev->MediaSize[1];
dev->width = (int)(rot_media_x * dev->HWResolution[0] / 72.0 + 0.5);
dev->height = ... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,248 | gx_device_set_margins(gx_device * dev, const float *margins /*[4] */ ,
bool move_origin)
{
int i;
for (i = 0; i < 4; ++i)
dev->HWMargins[i] = margins[i] * 72.0;
if (move_origin) {
dev->Margins[0] = -margins[0] * dev->HWResolution[0];
dev->Margins[1] = -margins[... | Exec Code Bypass | 0 | gx_device_set_margins(gx_device * dev, const float *margins /*[4] */ ,
bool move_origin)
{
int i;
for (i = 0; i < 4; ++i)
dev->HWMargins[i] = margins[i] * 72.0;
if (move_origin) {
dev->Margins[0] = -margins[0] * dev->HWResolution[0];
dev->Margins[1] = -margins[... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,249 | gx_device_set_media_size(gx_device * dev, double media_width, double media_height)
{
dev->MediaSize[0] = media_width;
dev->MediaSize[1] = media_height;
gx_device_set_hwsize_from_media(dev);
}
| Exec Code Bypass | 0 | gx_device_set_media_size(gx_device * dev, double media_width, double media_height)
{
dev->MediaSize[0] = media_width;
dev->MediaSize[1] = media_height;
gx_device_set_hwsize_from_media(dev);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,250 | gx_device_set_procs(gx_device * dev)
{
if (dev->static_procs != 0) { /* 0 if already populated */
dev->procs = *dev->static_procs;
dev->static_procs = 0;
}
}
| Exec Code Bypass | 0 | gx_device_set_procs(gx_device * dev)
{
if (dev->static_procs != 0) { /* 0 if already populated */
dev->procs = *dev->static_procs;
dev->static_procs = 0;
}
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,251 | gx_device_set_width_height(gx_device * dev, int width, int height)
{
dev->width = width;
dev->height = height;
gx_device_set_media_from_hwsize(dev);
}
| Exec Code Bypass | 0 | gx_device_set_width_height(gx_device * dev, int width, int height)
{
dev->width = width;
dev->height = height;
gx_device_set_media_from_hwsize(dev);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,252 | gx_finish_output_page(gx_device *dev, int num_copies, int flush)
{
dev->PageCount += num_copies;
return 0;
}
| Exec Code Bypass | 0 | gx_finish_output_page(gx_device *dev, int num_copies, int flush)
{
dev->PageCount += num_copies;
return 0;
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,253 | gx_outputfile_is_separate_pages(const char *fname, gs_memory_t *memory)
{
const char *fmt;
gs_parsed_file_name_t parsed;
int code = gx_parse_output_file_name(&parsed, &fmt, fname,
strlen(fname), memory);
return (code >= 0 && fmt != 0);
}
| Exec Code Bypass | 0 | gx_outputfile_is_separate_pages(const char *fname, gs_memory_t *memory)
{
const char *fmt;
gs_parsed_file_name_t parsed;
int code = gx_parse_output_file_name(&parsed, &fmt, fname,
strlen(fname), memory);
return (code >= 0 && fmt != 0);
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,254 | gx_parse_output_file_name(gs_parsed_file_name_t *pfn, const char **pfmt,
const char *fname, uint fnlen, gs_memory_t *memory)
{
int code;
*pfmt = 0;
pfn->memory = 0;
pfn->iodev = NULL;
pfn->fname = NULL; /* irrelevant since length = 0 */
pfn->len = 0;
if (fnlen == ... | Exec Code Bypass | 0 | gx_parse_output_file_name(gs_parsed_file_name_t *pfn, const char **pfmt,
const char *fname, uint fnlen, gs_memory_t *memory)
{
int code;
*pfmt = 0;
pfn->memory = 0;
pfn->iodev = NULL;
pfn->fname = NULL; /* irrelevant since length = 0 */
pfn->len = 0;
if (fnlen == ... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,255 | gx_parse_output_format(gs_parsed_file_name_t *pfn, const char **pfmt)
{
bool have_format = false, field;
int width[2], int_width = sizeof(int) * 3, w = 0;
uint i;
/* Scan the file name for a format string, and validate it if present. */
width[0] = width[1] = 0;
for (i = 0; i < pfn->len; ++i)
... | Exec Code Bypass | 0 | gx_parse_output_format(gs_parsed_file_name_t *pfn, const char **pfmt)
{
bool have_format = false, field;
int width[2], int_width = sizeof(int) * 3, w = 0;
uint i;
/* Scan the file name for a format string, and validate it if present. */
width[0] = width[1] = 0;
for (i = 0; i < pfn->len; ++i)
... | @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,256 | gx_set_device_only(gs_gstate * pgs, gx_device * dev)
{
rc_assign(pgs->device, dev, "gx_set_device_only");
}
| Exec Code Bypass | 0 | gx_set_device_only(gs_gstate * pgs, gx_device * dev)
{
rc_assign(pgs->device, dev, "gx_set_device_only");
}
| @@ -691,7 +691,7 @@ int
gs_nulldevice(gs_gstate * pgs)
{
int code = 0;
-
+ bool saveLockSafety = false;
if (pgs->device == 0 || !gx_device_is_null(pgs->device)) {
gx_device *ndev;
code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device,
@@ -699,6 +699,8 @@ gs_nulldevice(gs_gstate... | CWE-78 | null | null |
2,257 | z2grestoreall(i_ctx_t *i_ctx_p)
{
for (;;) {
if (!restore_page_device(igs, gs_gstate_saved(igs))) {
bool done = !gs_gstate_saved(gs_gstate_saved(igs));
gs_grestore(igs);
if (done)
break;
} else
return push_callout(i_ctx_p, "%grestoreal... | Exec Code Bypass | 0 | z2grestoreall(i_ctx_t *i_ctx_p)
{
for (;;) {
if (!restore_page_device(igs, gs_gstate_saved(igs))) {
bool done = !gs_gstate_saved(gs_gstate_saved(igs));
gs_grestore(igs);
if (done)
break;
} else
return push_callout(i_ctx_p, "%grestoreal... | @@ -26,6 +26,7 @@
#include "igstate.h"
#include "iname.h"
#include "iutil.h"
+#include "isave.h"
#include "store.h"
#include "gxdevice.h"
#include "gsstate.h"
@@ -307,13 +308,24 @@ z2grestoreall(i_ctx_t *i_ctx_p)
}
return 0;
}
-
+/* This is the Level 2+ variant of restore - which adds restoring
+ of ... | CWE-78 | null | null |
2,258 | ivalidate_clean_spaces(i_ctx_t *i_ctx_p)
{
if (gs_debug_c('?')) {
ref_stack_cleanup(&d_stack);
ref_stack_cleanup(&e_stack);
ref_stack_cleanup(&o_stack);
ivalidate_spaces();
}
}
| Exec Code Bypass | 0 | ivalidate_clean_spaces(i_ctx_t *i_ctx_p)
{
if (gs_debug_c('?')) {
ref_stack_cleanup(&d_stack);
ref_stack_cleanup(&e_stack);
ref_stack_cleanup(&o_stack);
ivalidate_spaces();
}
}
| @@ -99,19 +99,18 @@ zsave(i_ctx_t *i_ctx_p)
static int restore_check_operand(os_ptr, alloc_save_t **, gs_dual_memory_t *);
static int restore_check_stack(const i_ctx_t *i_ctx_p, const ref_stack_t *, const alloc_save_t *, bool);
static void restore_fix_stack(i_ctx_t *i_ctx_p, ref_stack_t *, const alloc_save_t *, bool... | CWE-78 | null | null |
2,259 | zsave(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
uint space = icurrent_space;
vm_save_t *vmsave;
ulong sid;
int code;
gs_gstate *prev;
if (I_VALIDATE_BEFORE_SAVE)
ivalidate_clean_spaces(i_ctx_p);
ialloc_set_space(idmemory, avm_local);
vmsave = ialloc_struct(vm_save_t, &st_vm_save,... | Exec Code Bypass | 0 | zsave(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
uint space = icurrent_space;
vm_save_t *vmsave;
ulong sid;
int code;
gs_gstate *prev;
if (I_VALIDATE_BEFORE_SAVE)
ivalidate_clean_spaces(i_ctx_p);
ialloc_set_space(idmemory, avm_local);
vmsave = ialloc_struct(vm_save_t, &st_vm_save,... | @@ -99,19 +99,18 @@ zsave(i_ctx_t *i_ctx_p)
static int restore_check_operand(os_ptr, alloc_save_t **, gs_dual_memory_t *);
static int restore_check_stack(const i_ctx_t *i_ctx_p, const ref_stack_t *, const alloc_save_t *, bool);
static void restore_fix_stack(i_ctx_t *i_ctx_p, ref_stack_t *, const alloc_save_t *, bool... | CWE-78 | null | null |
2,260 | foreach_item_helper (GHashTable *hash,
NMVPNIterFunc func,
gpointer user_data)
{
GList *keys, *liter;
GSList *copied = NULL, *siter;
g_return_if_fail (hash != NULL);
/* Grab keys and copy them so that the callback func can modify
* the hash table items if it wants to.
... | +Info | 0 | foreach_item_helper (GHashTable *hash,
NMVPNIterFunc func,
gpointer user_data)
{
GList *keys, *liter;
GSList *copied = NULL, *siter;
g_return_if_fail (hash != NULL);
/* Grab keys and copy them so that the callback func can modify
* the hash table items if it wants to.
... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,261 | get_secret_flags (NMSetting *setting,
const char *secret_name,
gboolean verify_secret,
NMSettingSecretFlags *out_flags,
GError **error)
{
NMSettingVPNPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting);
gboolean success = FALSE;
char *flags_key... | +Info | 0 | get_secret_flags (NMSetting *setting,
const char *secret_name,
gboolean verify_secret,
NMSettingSecretFlags *out_flags,
GError **error)
{
NMSettingVPNPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting);
gboolean success = FALSE;
char *flags_key... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,262 | need_secrets (NMSetting *setting)
{
/* Assume that VPN connections need secrets since they almost always will */
return g_ptr_array_sized_new (1);
}
| +Info | 0 | need_secrets (NMSetting *setting)
{
/* Assume that VPN connections need secrets since they almost always will */
return g_ptr_array_sized_new (1);
}
| @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,263 | nm_setting_vpn_add_data_item (NMSettingVPN *setting,
const char *key,
const char *item)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
g_return_if_fail (key != NULL);
g_return_if_fail (strlen (key) > 0);
g_return_if_fail (item != NULL);
g_return_if_fai... | +Info | 0 | nm_setting_vpn_add_data_item (NMSettingVPN *setting,
const char *key,
const char *item)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
g_return_if_fail (key != NULL);
g_return_if_fail (strlen (key) > 0);
g_return_if_fail (item != NULL);
g_return_if_fai... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,264 | nm_setting_vpn_add_secret (NMSettingVPN *setting,
const char *key,
const char *secret)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
g_return_if_fail (key != NULL);
g_return_if_fail (strlen (key) > 0);
g_return_if_fail (secret != NULL);
g_return_if_fail (st... | +Info | 0 | nm_setting_vpn_add_secret (NMSettingVPN *setting,
const char *key,
const char *secret)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
g_return_if_fail (key != NULL);
g_return_if_fail (strlen (key) > 0);
g_return_if_fail (secret != NULL);
g_return_if_fail (st... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,265 | nm_setting_vpn_error_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GEnumValue values[] = {
/* Unknown error. */
ENUM_ENTRY (NM_SETTING_VPN_ERROR_UNKNOWN, "UnknownError"),
/* The specified property was invalid. */
ENUM_ENTRY (NM_SETTING_VPN_ERROR_INVALID_PROPERTY, "InvalidProp... | +Info | 0 | nm_setting_vpn_error_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GEnumValue values[] = {
/* Unknown error. */
ENUM_ENTRY (NM_SETTING_VPN_ERROR_UNKNOWN, "UnknownError"),
/* The specified property was invalid. */
ENUM_ENTRY (NM_SETTING_VPN_ERROR_INVALID_PROPERTY, "InvalidProp... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,266 | nm_setting_vpn_error_quark (void)
{
static GQuark quark;
if (G_UNLIKELY (!quark))
quark = g_quark_from_static_string ("nm-setting-vpn-error-quark");
return quark;
}
| +Info | 0 | nm_setting_vpn_error_quark (void)
{
static GQuark quark;
if (G_UNLIKELY (!quark))
quark = g_quark_from_static_string ("nm-setting-vpn-error-quark");
return quark;
}
| @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,267 | nm_setting_vpn_foreach_data_item (NMSettingVPN *setting,
NMVPNIterFunc func,
gpointer user_data)
{
g_return_if_fail (setting != NULL);
g_return_if_fail (NM_IS_SETTING_VPN (setting));
foreach_item_helper (NM_SETTING_VPN_GET_PRIVATE (setting)->data, ... | +Info | 0 | nm_setting_vpn_foreach_data_item (NMSettingVPN *setting,
NMVPNIterFunc func,
gpointer user_data)
{
g_return_if_fail (setting != NULL);
g_return_if_fail (NM_IS_SETTING_VPN (setting));
foreach_item_helper (NM_SETTING_VPN_GET_PRIVATE (setting)->data, ... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,268 | nm_setting_vpn_get_data_item (NMSettingVPN *setting, const char *key)
{
g_return_val_if_fail (NM_IS_SETTING_VPN (setting), NULL);
return (const char *) g_hash_table_lookup (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key);
}
| +Info | 0 | nm_setting_vpn_get_data_item (NMSettingVPN *setting, const char *key)
{
g_return_val_if_fail (NM_IS_SETTING_VPN (setting), NULL);
return (const char *) g_hash_table_lookup (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key);
}
| @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,269 | nm_setting_vpn_get_service_type (NMSettingVPN *setting)
{
g_return_val_if_fail (NM_IS_SETTING_VPN (setting), NULL);
return NM_SETTING_VPN_GET_PRIVATE (setting)->service_type;
}
| +Info | 0 | nm_setting_vpn_get_service_type (NMSettingVPN *setting)
{
g_return_val_if_fail (NM_IS_SETTING_VPN (setting), NULL);
return NM_SETTING_VPN_GET_PRIVATE (setting)->service_type;
}
| @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,270 | nm_setting_vpn_new (void)
{
return (NMSetting *) g_object_new (NM_TYPE_SETTING_VPN, NULL);
}
| +Info | 0 | nm_setting_vpn_new (void)
{
return (NMSetting *) g_object_new (NM_TYPE_SETTING_VPN, NULL);
}
| @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,271 | nm_setting_vpn_remove_data_item (NMSettingVPN *setting, const char *key)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key);
}
| +Info | 0 | nm_setting_vpn_remove_data_item (NMSettingVPN *setting, const char *key)
{
g_return_if_fail (NM_IS_SETTING_VPN (setting));
g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key);
}
| @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,272 | set_secret_flags (NMSetting *setting,
const char *secret_name,
gboolean verify_secret,
NMSettingSecretFlags flags,
GError **error)
{
g_hash_table_insert (NM_SETTING_VPN_GET_PRIVATE (setting)->data,
g_strdup_printf ("%s-flags"... | +Info | 0 | set_secret_flags (NMSetting *setting,
const char *secret_name,
gboolean verify_secret,
NMSettingSecretFlags flags,
GError **error)
{
g_hash_table_insert (NM_SETTING_VPN_GET_PRIVATE (setting)->data,
g_strdup_printf ("%s-flags"... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,273 | update_one_secret (NMSetting *setting, const char *key, GValue *value, GError **error)
{
gboolean success = FALSE;
g_return_val_if_fail (key != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
if (G_VALUE_HOLDS_STRING (value)) {
/* Passing the string properties individually isn't correct, and won't
... | +Info | 0 | update_one_secret (NMSetting *setting, const char *key, GValue *value, GError **error)
{
gboolean success = FALSE;
g_return_val_if_fail (key != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
if (G_VALUE_HOLDS_STRING (value)) {
/* Passing the string properties individually isn't correct, and won't
... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,274 | update_secret_hash (NMSetting *setting,
GHashTable *secrets,
GError **error)
{
NMSettingVPNPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting);
GHashTableIter iter;
const char *name, *value;
g_return_val_if_fail (secrets != NULL, FALSE);
/* Make sure the items are valid *... | +Info | 0 | update_secret_hash (NMSetting *setting,
GHashTable *secrets,
GError **error)
{
NMSettingVPNPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting);
GHashTableIter iter;
const char *name, *value;
g_return_val_if_fail (secrets != NULL, FALSE);
/* Make sure the items are valid *... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,275 | update_secret_string (NMSetting *setting,
const char *key,
const char *value,
GError **error)
{
NMSettingVPNPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting);
g_return_val_if_fail (key != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
... | +Info | 0 | update_secret_string (NMSetting *setting,
const char *key,
const char *value,
GError **error)
{
NMSettingVPNPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting);
g_return_val_if_fail (key != NULL, FALSE);
g_return_val_if_fail (value != NULL, FALSE);
... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,276 | verify (NMSetting *setting, GSList *all_settings, GError **error)
{
NMSettingVPNPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting);
if (!priv->service_type) {
g_set_error (error,
NM_SETTING_VPN_ERROR,
NM_SETTING_VPN_ERROR_MISSING_PROPERTY,
NM_SETTING_VPN_SERVICE_TYPE)... | +Info | 0 | verify (NMSetting *setting, GSList *all_settings, GError **error)
{
NMSettingVPNPrivate *priv = NM_SETTING_VPN_GET_PRIVATE (setting);
if (!priv->service_type) {
g_set_error (error,
NM_SETTING_VPN_ERROR,
NM_SETTING_VPN_ERROR_MISSING_PROPERTY,
NM_SETTING_VPN_SERVICE_TYPE)... | @@ -457,7 +457,6 @@ destroy_one_secret (gpointer data)
char *secret = (char *) data;
/* Don't leave the secret lying around in memory */
-g_message ("%s: destroying %s", __func__, secret);
memset (secret, 0, strlen (secret));
g_free (secret);
} | CWE-200 | null | null |
2,277 | gst_pngdec_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_pngdec_src_pad_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_... | DoS Exec Code Overflow | 0 | gst_pngdec_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_pngdec_src_pad_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_... | @@ -201,7 +201,14 @@ user_info_callback (png_structp png_ptr, png_infop info)
/* Allocate output buffer */
pngdec->rowbytes = png_get_rowbytes (pngdec->png, pngdec->info);
- buffer_size = pngdec->height * GST_ROUND_UP_4 (pngdec->rowbytes);
+ if (pngdec->rowbytes > (G_MAXUINT32 - 3)
+ || pngdec->height > ... | CWE-189 | null | null |
2,278 | gst_pngdec_get_type (void)
{
static GType pngdec_type = 0;
if (!pngdec_type) {
static const GTypeInfo pngdec_info = {
sizeof (GstPngDecClass),
gst_pngdec_base_init,
NULL,
(GClassInitFunc) gst_pngdec_class_init,
NULL,
NULL,
sizeof (GstPngDec),
0,
(GInstanceI... | DoS Exec Code Overflow | 0 | gst_pngdec_get_type (void)
{
static GType pngdec_type = 0;
if (!pngdec_type) {
static const GTypeInfo pngdec_info = {
sizeof (GstPngDecClass),
gst_pngdec_base_init,
NULL,
(GClassInitFunc) gst_pngdec_class_init,
NULL,
NULL,
sizeof (GstPngDec),
0,
(GInstanceI... | @@ -201,7 +201,14 @@ user_info_callback (png_structp png_ptr, png_infop info)
/* Allocate output buffer */
pngdec->rowbytes = png_get_rowbytes (pngdec->png, pngdec->info);
- buffer_size = pngdec->height * GST_ROUND_UP_4 (pngdec->rowbytes);
+ if (pngdec->rowbytes > (G_MAXUINT32 - 3)
+ || pngdec->height > ... | CWE-189 | null | null |
2,279 | gst_pngdec_init (GstPngDec * pngdec)
{
pngdec->sinkpad =
gst_pad_new_from_static_template (&gst_pngdec_sink_pad_template, "sink");
gst_pad_set_activate_function (pngdec->sinkpad, gst_pngdec_sink_activate);
gst_pad_set_activatepush_function (pngdec->sinkpad,
gst_pngdec_sink_activate_push);
gst_pad_se... | DoS Exec Code Overflow | 0 | gst_pngdec_init (GstPngDec * pngdec)
{
pngdec->sinkpad =
gst_pad_new_from_static_template (&gst_pngdec_sink_pad_template, "sink");
gst_pad_set_activate_function (pngdec->sinkpad, gst_pngdec_sink_activate);
gst_pad_set_activatepush_function (pngdec->sinkpad,
gst_pngdec_sink_activate_push);
gst_pad_se... | @@ -201,7 +201,14 @@ user_info_callback (png_structp png_ptr, png_infop info)
/* Allocate output buffer */
pngdec->rowbytes = png_get_rowbytes (pngdec->png, pngdec->info);
- buffer_size = pngdec->height * GST_ROUND_UP_4 (pngdec->rowbytes);
+ if (pngdec->rowbytes > (G_MAXUINT32 - 3)
+ || pngdec->height > ... | CWE-189 | null | null |
2,280 | ProcPanoramiXShmCreatePixmap(ClientPtr client)
{
ScreenPtr pScreen = NULL;
PixmapPtr pMap = NULL;
DrawablePtr pDraw;
DepthPtr pDepth;
int i, j, result, rc;
ShmDescPtr shmdesc;
REQUEST(xShmCreatePixmapReq);
unsigned int width, height, depth;
unsigned long size;
PanoramiXRes *newP... | null | 0 | ProcPanoramiXShmCreatePixmap(ClientPtr client)
{
ScreenPtr pScreen = NULL;
PixmapPtr pMap = NULL;
DrawablePtr pDraw;
DepthPtr pDepth;
int i, j, result, rc;
ShmDescPtr shmdesc;
REQUEST(xShmCreatePixmapReq);
unsigned int width, height, depth;
unsigned long size;
PanoramiXRes *newP... | @@ -1238,6 +1238,7 @@ ProcShmCreateSegment(ClientPtr client)
};
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
+ LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
client->errorValue = stuff->readOnly;
return BadValue; | CWE-269 | null | null |
2,281 | ProcPanoramiXShmGetImage(ClientPtr client)
{
PanoramiXRes *draw;
DrawablePtr *drawables;
DrawablePtr pDraw;
xShmGetImageReply xgi;
ShmDescPtr shmdesc;
int i, x, y, w, h, format, rc;
Mask plane = 0, planemask;
long lenPer = 0, length, widthBytesLine;
Bool isRoot;
REQUEST(xShmGetI... | null | 0 | ProcPanoramiXShmGetImage(ClientPtr client)
{
PanoramiXRes *draw;
DrawablePtr *drawables;
DrawablePtr pDraw;
xShmGetImageReply xgi;
ShmDescPtr shmdesc;
int i, x, y, w, h, format, rc;
Mask plane = 0, planemask;
long lenPer = 0, length, widthBytesLine;
Bool isRoot;
REQUEST(xShmGetI... | @@ -1238,6 +1238,7 @@ ProcShmCreateSegment(ClientPtr client)
};
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
+ LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
client->errorValue = stuff->readOnly;
return BadValue; | CWE-269 | null | null |
2,282 | ProcPanoramiXShmPutImage(ClientPtr client)
{
int j, result, orig_x, orig_y;
PanoramiXRes *draw, *gc;
Bool sendEvent, isRoot;
REQUEST(xShmPutImageReq);
REQUEST_SIZE_MATCH(xShmPutImageReq);
result = dixLookupResourceByClass((void **) &draw, stuff->drawable,
... | null | 0 | ProcPanoramiXShmPutImage(ClientPtr client)
{
int j, result, orig_x, orig_y;
PanoramiXRes *draw, *gc;
Bool sendEvent, isRoot;
REQUEST(xShmPutImageReq);
REQUEST_SIZE_MATCH(xShmPutImageReq);
result = dixLookupResourceByClass((void **) &draw, stuff->drawable,
... | @@ -1238,6 +1238,7 @@ ProcShmCreateSegment(ClientPtr client)
};
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
+ LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
client->errorValue = stuff->readOnly;
return BadValue; | CWE-269 | null | null |
2,283 | ProcShmAttach(ClientPtr client)
{
SHMSTAT_TYPE buf;
ShmDescPtr shmdesc;
REQUEST(xShmAttachReq);
REQUEST_SIZE_MATCH(xShmAttachReq);
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
client->errorValue = stuff->readOnly;
r... | null | 0 | ProcShmAttach(ClientPtr client)
{
SHMSTAT_TYPE buf;
ShmDescPtr shmdesc;
REQUEST(xShmAttachReq);
REQUEST_SIZE_MATCH(xShmAttachReq);
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
client->errorValue = stuff->readOnly;
r... | @@ -1238,6 +1238,7 @@ ProcShmCreateSegment(ClientPtr client)
};
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
+ LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
client->errorValue = stuff->readOnly;
return BadValue; | CWE-269 | null | null |
2,284 | ProcShmAttachFd(ClientPtr client)
{
int fd;
ShmDescPtr shmdesc;
REQUEST(xShmAttachFdReq);
struct stat statb;
SetReqFds(client, 1);
REQUEST_SIZE_MATCH(xShmAttachFdReq);
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
cli... | null | 0 | ProcShmAttachFd(ClientPtr client)
{
int fd;
ShmDescPtr shmdesc;
REQUEST(xShmAttachFdReq);
struct stat statb;
SetReqFds(client, 1);
REQUEST_SIZE_MATCH(xShmAttachFdReq);
LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
cli... | @@ -1238,6 +1238,7 @@ ProcShmCreateSegment(ClientPtr client)
};
REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
+ LEGAL_NEW_RESOURCE(stuff->shmseg, client);
if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
client->errorValue = stuff->readOnly;
return BadValue; | CWE-269 | null | null |
2,285 | FontFileAddEntry(FontTablePtr table, FontEntryPtr prototype)
{
FontEntryPtr entry;
int newsize;
/* can't add entries to a sorted table, pointers get broken! */
if (table->sorted)
return (FontEntryPtr) 0; /* "cannot" happen */
if (table->used == table->size) {
if (table->size >= ((INT32... | DoS | 0 | FontFileAddEntry(FontTablePtr table, FontEntryPtr prototype)
{
FontEntryPtr entry;
int newsize;
/* can't add entries to a sorted table, pointers get broken! */
if (table->sorted)
return (FontEntryPtr) 0; /* "cannot" happen */
if (table->used == table->size) {
if (table->size >= ((INT32... | @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
}
}
case '?':
- if (*string++ == XK_minus)
+ if ((t = *string++) == XK_minus)
stringdashes--;
+ if (!t)
+ return 0;
break;
case '\0':
return (*string == '\0'); | CWE-125 | null | null |
2,286 | FontFileFreeDir (FontDirectoryPtr dir)
{
FontFileFreeTable (&dir->scalable);
FontFileFreeTable (&dir->nonScalable);
free(dir);
}
| DoS | 0 | FontFileFreeDir (FontDirectoryPtr dir)
{
FontFileFreeTable (&dir->scalable);
FontFileFreeTable (&dir->nonScalable);
free(dir);
}
| @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
}
}
case '?':
- if (*string++ == XK_minus)
+ if ((t = *string++) == XK_minus)
stringdashes--;
+ if (!t)
+ return 0;
break;
case '\0':
return (*string == '\0'); | CWE-125 | null | null |
2,287 | FontFileFreeEntry (FontEntryPtr entry)
{
FontScalableExtraPtr extra;
int i;
if (entry->name.name)
free(entry->name.name);
entry->name.name = NULL;
switch (entry->type)
{
case FONT_ENTRY_SCALABLE:
free (entry->u.scalable.fileName);
extra = entry->u.scalable.extra;
for (i = 0; i < extr... | DoS | 0 | FontFileFreeEntry (FontEntryPtr entry)
{
FontScalableExtraPtr extra;
int i;
if (entry->name.name)
free(entry->name.name);
entry->name.name = NULL;
switch (entry->type)
{
case FONT_ENTRY_SCALABLE:
free (entry->u.scalable.fileName);
extra = entry->u.scalable.extra;
for (i = 0; i < extr... | @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
}
}
case '?':
- if (*string++ == XK_minus)
+ if ((t = *string++) == XK_minus)
stringdashes--;
+ if (!t)
+ return 0;
break;
case '\0':
return (*string == '\0'); | CWE-125 | null | null |
2,288 | FontFileInitTable (FontTablePtr table, int size)
{
if (size < 0 || (size > INT32_MAX/sizeof(FontEntryRec)))
return FALSE;
if (size)
{
table->entries = malloc(sizeof(FontEntryRec) * size);
if (!table->entries)
return FALSE;
}
else
table->entries = 0;
table->used = 0;
table->size = si... | DoS | 0 | FontFileInitTable (FontTablePtr table, int size)
{
if (size < 0 || (size > INT32_MAX/sizeof(FontEntryRec)))
return FALSE;
if (size)
{
table->entries = malloc(sizeof(FontEntryRec) * size);
if (!table->entries)
return FALSE;
}
else
table->entries = 0;
table->used = 0;
table->size = si... | @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
}
}
case '?':
- if (*string++ == XK_minus)
+ if ((t = *string++) == XK_minus)
stringdashes--;
+ if (!t)
+ return 0;
break;
case '\0':
return (*string == '\0'); | CWE-125 | null | null |
2,289 | FontFileSortDir(FontDirectoryPtr dir)
{
FontFileSortTable (&dir->scalable);
FontFileSortTable (&dir->nonScalable);
/* now that the table is fixed in size, swizzle the pointers */
FontFileSwitchStringsToBitmapPointers (dir);
}
| DoS | 0 | FontFileSortDir(FontDirectoryPtr dir)
{
FontFileSortTable (&dir->scalable);
FontFileSortTable (&dir->nonScalable);
/* now that the table is fixed in size, swizzle the pointers */
FontFileSwitchStringsToBitmapPointers (dir);
}
| @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
}
}
case '?':
- if (*string++ == XK_minus)
+ if ((t = *string++) == XK_minus)
stringdashes--;
+ if (!t)
+ return 0;
break;
case '\0':
return (*string == '\0'); | CWE-125 | null | null |
2,290 | FontFileSortTable (FontTablePtr table)
{
if (!table->sorted) {
qsort((char *) table->entries, table->used, sizeof(FontEntryRec),
FontFileNameCompare);
table->sorted = TRUE;
}
}
| DoS | 0 | FontFileSortTable (FontTablePtr table)
{
if (!table->sorted) {
qsort((char *) table->entries, table->used, sizeof(FontEntryRec),
FontFileNameCompare);
table->sorted = TRUE;
}
}
| @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
}
}
case '?':
- if (*string++ == XK_minus)
+ if ((t = *string++) == XK_minus)
stringdashes--;
+ if (!t)
+ return 0;
break;
case '\0':
return (*string == '\0'); | CWE-125 | null | null |
2,291 | SetupWildMatch(FontTablePtr table, FontNamePtr pat,
int *leftp, int *rightp, int *privatep)
{
int nDashes;
char c;
char *t;
char *firstWild;
char *firstDigit;
int first;
int center,
left,
right;
int ... | DoS | 0 | SetupWildMatch(FontTablePtr table, FontNamePtr pat,
int *leftp, int *rightp, int *privatep)
{
int nDashes;
char c;
char *t;
char *firstWild;
char *firstDigit;
int first;
int center,
left,
right;
int ... | @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
}
}
case '?':
- if (*string++ == XK_minus)
+ if ((t = *string++) == XK_minus)
stringdashes--;
+ if (!t)
+ return 0;
break;
case '\0':
return (*string == '\0'); | CWE-125 | null | null |
2,292 | static int strcmpn(const char *s1, const char *s2)
{
int digits, predigits = 0;
const char *ss1, *ss2;
while (1) {
if (*s1 == 0 && *s2 == 0)
return 0;
digits = Xisdigit(*s1) && Xisdigit(*s2);
if (digits && !predigits) {
ss1 = s1;
ss2 = s2;
while (Xisdigit(*ss1) && Xisdigit(*ss2))
s... | DoS | 0 | static int strcmpn(const char *s1, const char *s2)
{
int digits, predigits = 0;
const char *ss1, *ss2;
while (1) {
if (*s1 == 0 && *s2 == 0)
return 0;
digits = Xisdigit(*s1) && Xisdigit(*s2);
if (digits && !predigits) {
ss1 = s1;
ss2 = s2;
while (Xisdigit(*ss1) && Xisdigit(*ss2))
s... | @@ -400,8 +400,10 @@ PatternMatch(char *pat, int patdashes, char *string, int stringdashes)
}
}
case '?':
- if (*string++ == XK_minus)
+ if ((t = *string++) == XK_minus)
stringdashes--;
+ if (!t)
+ return 0;
break;
case '\0':
return (*string == '\0'); | CWE-125 | null | null |
2,293 | copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr)
{
uint size = ref_stack_count(pstack) - skip;
uint save_space = ialloc_space(idmemory);
int code;
if (size > 65535)
size = 65535;
ialloc_set_space(idmemory, avm_local);
code = ialloc_ref_array(arr, a_all, size... | null | 0 | copy_stack(i_ctx_t *i_ctx_p, const ref_stack_t * pstack, int skip, ref * arr)
{
uint size = ref_stack_count(pstack) - skip;
uint save_space = ialloc_space(idmemory);
int code;
if (size > 65535)
size = 65535;
ialloc_set_space(idmemory, avm_local);
code = ialloc_ref_array(arr, a_all, size... | @@ -676,7 +676,12 @@ again:
/* Push the error object on the operand stack if appropriate. */
if (!GS_ERROR_IS_INTERRUPT(code)) {
/* Replace the error object if within an oparray or .errorexec. */
- *++osp = *perror_object;
+ osp++;
+ if (osp >= ostop) {
+ *pexit_code =... | CWE-388 | null | null |
2,294 | gs_errorname(i_ctx_t *i_ctx_p, int code, ref * perror_name)
{
ref *perrordict, *pErrorNames;
if (dict_find_string(systemdict, "errordict", &perrordict) <= 0 ||
dict_find_string(systemdict, "ErrorNames", &pErrorNames) <= 0
)
return_error(gs_error_undefined); /* errordict or ErrorNam... | null | 0 | gs_errorname(i_ctx_t *i_ctx_p, int code, ref * perror_name)
{
ref *perrordict, *pErrorNames;
if (dict_find_string(systemdict, "errordict", &perrordict) <= 0 ||
dict_find_string(systemdict, "ErrorNames", &pErrorNames) <= 0
)
return_error(gs_error_undefined); /* errordict or ErrorNam... | @@ -676,7 +676,12 @@ again:
/* Push the error object on the operand stack if appropriate. */
if (!GS_ERROR_IS_INTERRUPT(code)) {
/* Replace the error object if within an oparray or .errorexec. */
- *++osp = *perror_object;
+ osp++;
+ if (osp >= ostop) {
+ *pexit_code =... | CWE-388 | null | null |
2,295 | interp(i_ctx_t **pi_ctx_p /* context for execution, updated if resched */,
const ref * pref /* object to interpret */,
ref * perror_object)
{
i_ctx_t *i_ctx_p = *pi_ctx_p;
/*
* Note that iref may actually be either a ref * or a ref_packed *.
* Certain DEC compilers assume that a ref * is... | null | 0 | interp(i_ctx_t **pi_ctx_p /* context for execution, updated if resched */,
const ref * pref /* object to interpret */,
ref * perror_object)
{
i_ctx_t *i_ctx_p = *pi_ctx_p;
/*
* Note that iref may actually be either a ref * or a ref_packed *.
* Certain DEC compilers assume that a ref * is... | @@ -676,7 +676,12 @@ again:
/* Push the error object on the operand stack if appropriate. */
if (!GS_ERROR_IS_INTERRUPT(code)) {
/* Replace the error object if within an oparray or .errorexec. */
- *++osp = *perror_object;
+ osp++;
+ if (osp >= ostop) {
+ *pexit_code =... | CWE-388 | null | null |
2,296 | oparray_cleanup(i_ctx_t *i_ctx_p)
{ /* esp points just below the cleanup procedure. */
es_ptr ep = esp;
uint ocount_old = (uint) ep[3].value.intval;
uint dcount_old = (uint) ep[4].value.intval;
uint ocount = ref_stack_count(&o_stack);
uint dcount = ref_stack_count(&d_st... | null | 0 | oparray_cleanup(i_ctx_t *i_ctx_p)
{ /* esp points just below the cleanup procedure. */
es_ptr ep = esp;
uint ocount_old = (uint) ep[3].value.intval;
uint dcount_old = (uint) ep[4].value.intval;
uint ocount = ref_stack_count(&o_stack);
uint dcount = ref_stack_count(&d_st... | @@ -676,7 +676,12 @@ again:
/* Push the error object on the operand stack if appropriate. */
if (!GS_ERROR_IS_INTERRUPT(code)) {
/* Replace the error object if within an oparray or .errorexec. */
- *++osp = *perror_object;
+ osp++;
+ if (osp >= ostop) {
+ *pexit_code =... | CWE-388 | null | null |
2,297 | oparray_no_cleanup(i_ctx_t *i_ctx_p)
{
return 0;
}
| null | 0 | oparray_no_cleanup(i_ctx_t *i_ctx_p)
{
return 0;
}
| @@ -676,7 +676,12 @@ again:
/* Push the error object on the operand stack if appropriate. */
if (!GS_ERROR_IS_INTERRUPT(code)) {
/* Replace the error object if within an oparray or .errorexec. */
- *++osp = *perror_object;
+ osp++;
+ if (osp >= ostop) {
+ *pexit_code =... | CWE-388 | null | null |
2,298 | zerrorexec(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code;
check_op(2);
check_estack(4); /* mark/cleanup, errobj, pop, obj */
push_mark_estack(es_other, errorexec_cleanup);
*++esp = op[-1];
push_op_estack(errorexec_pop);
code = zexec(i_ctx_p);
if (code >= 0)
pop(1)... | null | 0 | zerrorexec(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
int code;
check_op(2);
check_estack(4); /* mark/cleanup, errobj, pop, obj */
push_mark_estack(es_other, errorexec_cleanup);
*++esp = op[-1];
push_op_estack(errorexec_pop);
code = zexec(i_ctx_p);
if (code >= 0)
pop(1)... | @@ -676,7 +676,12 @@ again:
/* Push the error object on the operand stack if appropriate. */
if (!GS_ERROR_IS_INTERRUPT(code)) {
/* Replace the error object if within an oparray or .errorexec. */
- *++osp = *perror_object;
+ osp++;
+ if (osp >= ostop) {
+ *pexit_code =... | CWE-388 | null | null |
2,299 | zfinderrorobject(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
ref errobj;
if (errorexec_find(i_ctx_p, &errobj)) {
push(2);
op[-1] = errobj;
make_true(op);
} else {
push(1);
make_false(op);
}
return 0;
}
| null | 0 | zfinderrorobject(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
ref errobj;
if (errorexec_find(i_ctx_p, &errobj)) {
push(2);
op[-1] = errobj;
make_true(op);
} else {
push(1);
make_false(op);
}
return 0;
}
| @@ -676,7 +676,12 @@ again:
/* Push the error object on the operand stack if appropriate. */
if (!GS_ERROR_IS_INTERRUPT(code)) {
/* Replace the error object if within an oparray or .errorexec. */
- *++osp = *perror_object;
+ osp++;
+ if (osp >= ostop) {
+ *pexit_code =... | CWE-388 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.