idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
11,100
ZEND_METHOD(CURLFile, getPostFilename) { curlfile_get_property("postname", INTERNAL_FUNCTION_PARAM_PASSTHRU); }
DoS
0
ZEND_METHOD(CURLFile, getPostFilename) { curlfile_get_property("postname", INTERNAL_FUNCTION_PARAM_PASSTHRU); }
@@ -137,7 +137,10 @@ ZEND_METHOD(CURLFile, setPostFilename) Unserialization handler */ ZEND_METHOD(CURLFile, __wakeup) { - zend_update_property_string(curl_CURLFile_class, getThis(), "name", sizeof("name")-1, "" TSRMLS_CC); + zval *_this = getThis(); + + zend_unset_property(curl_CURLFile_class, ...
CWE-416
null
null
11,101
ZEND_METHOD(CURLFile, setMimeType) { curlfile_set_property("mime", INTERNAL_FUNCTION_PARAM_PASSTHRU); }
DoS
0
ZEND_METHOD(CURLFile, setMimeType) { curlfile_set_property("mime", INTERNAL_FUNCTION_PARAM_PASSTHRU); }
@@ -137,7 +137,10 @@ ZEND_METHOD(CURLFile, setPostFilename) Unserialization handler */ ZEND_METHOD(CURLFile, __wakeup) { - zend_update_property_string(curl_CURLFile_class, getThis(), "name", sizeof("name")-1, "" TSRMLS_CC); + zval *_this = getThis(); + + zend_unset_property(curl_CURLFile_class, ...
CWE-416
null
null
11,102
ZEND_METHOD(CURLFile, setPostFilename) { curlfile_set_property("postname", INTERNAL_FUNCTION_PARAM_PASSTHRU); }
DoS
0
ZEND_METHOD(CURLFile, setPostFilename) { curlfile_set_property("postname", INTERNAL_FUNCTION_PARAM_PASSTHRU); }
@@ -137,7 +137,10 @@ ZEND_METHOD(CURLFile, setPostFilename) Unserialization handler */ ZEND_METHOD(CURLFile, __wakeup) { - zend_update_property_string(curl_CURLFile_class, getThis(), "name", sizeof("name")-1, "" TSRMLS_CC); + zval *_this = getThis(); + + zend_unset_property(curl_CURLFile_class, ...
CWE-416
null
null
11,103
static void curlfile_ctor(INTERNAL_FUNCTION_PARAMETERS) { char *fname = NULL, *mime = NULL, *postname = NULL; int fname_len, mime_len, postname_len; zval *cf = return_value; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ss", &fname, &fname_len, &mime, &mime_len, &postname, &postname_len) == FAILURE) { ...
DoS
0
static void curlfile_ctor(INTERNAL_FUNCTION_PARAMETERS) { char *fname = NULL, *mime = NULL, *postname = NULL; int fname_len, mime_len, postname_len; zval *cf = return_value; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ss", &fname, &fname_len, &mime, &mime_len, &postname, &postname_len) == FAILURE) { ...
@@ -137,7 +137,10 @@ ZEND_METHOD(CURLFile, setPostFilename) Unserialization handler */ ZEND_METHOD(CURLFile, __wakeup) { - zend_update_property_string(curl_CURLFile_class, getThis(), "name", sizeof("name")-1, "" TSRMLS_CC); + zval *_this = getThis(); + + zend_unset_property(curl_CURLFile_class, ...
CWE-416
null
null
11,104
static void curlfile_get_property(char *name, INTERNAL_FUNCTION_PARAMETERS) { zval *res; if (zend_parse_parameters_none() == FAILURE) { return; } res = zend_read_property(curl_CURLFile_class, getThis(), name, strlen(name), 1 TSRMLS_CC); *return_value = *res; zval_copy_ctor(return_value); INIT_PZVAL(return_valu...
DoS
0
static void curlfile_get_property(char *name, INTERNAL_FUNCTION_PARAMETERS) { zval *res; if (zend_parse_parameters_none() == FAILURE) { return; } res = zend_read_property(curl_CURLFile_class, getThis(), name, strlen(name), 1 TSRMLS_CC); *return_value = *res; zval_copy_ctor(return_value); INIT_PZVAL(return_valu...
@@ -137,7 +137,10 @@ ZEND_METHOD(CURLFile, setPostFilename) Unserialization handler */ ZEND_METHOD(CURLFile, __wakeup) { - zend_update_property_string(curl_CURLFile_class, getThis(), "name", sizeof("name")-1, "" TSRMLS_CC); + zval *_this = getThis(); + + zend_unset_property(curl_CURLFile_class, ...
CWE-416
null
null
11,105
void curlfile_register_class(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY( ce, "CURLFile", curlfile_funcs ); curl_CURLFile_class = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_string(curl_CURLFile_class, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_stri...
DoS
0
void curlfile_register_class(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY( ce, "CURLFile", curlfile_funcs ); curl_CURLFile_class = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_string(curl_CURLFile_class, "name", sizeof("name")-1, "", ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_property_stri...
@@ -137,7 +137,10 @@ ZEND_METHOD(CURLFile, setPostFilename) Unserialization handler */ ZEND_METHOD(CURLFile, __wakeup) { - zend_update_property_string(curl_CURLFile_class, getThis(), "name", sizeof("name")-1, "" TSRMLS_CC); + zval *_this = getThis(); + + zend_unset_property(curl_CURLFile_class, ...
CWE-416
null
null
11,106
static void curlfile_set_property(char *name, INTERNAL_FUNCTION_PARAMETERS) { char *arg = NULL; int arg_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) == FAILURE) { return; } zend_update_property_string(curl_CURLFile_class, getThis(), name, strlen(name), arg TSRMLS_CC); }
DoS
0
static void curlfile_set_property(char *name, INTERNAL_FUNCTION_PARAMETERS) { char *arg = NULL; int arg_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) == FAILURE) { return; } zend_update_property_string(curl_CURLFile_class, getThis(), name, strlen(name), arg TSRMLS_CC); }
@@ -137,7 +137,10 @@ ZEND_METHOD(CURLFile, setPostFilename) Unserialization handler */ ZEND_METHOD(CURLFile, __wakeup) { - zend_update_property_string(curl_CURLFile_class, getThis(), "name", sizeof("name")-1, "" TSRMLS_CC); + zval *_this = getThis(); + + zend_unset_property(curl_CURLFile_class, ...
CWE-416
null
null
11,107
namecmp(const void *key, const void *name) { return strcmp((char *)key, *(char **)name); }
DoS
0
namecmp(const void *key, const void *name) { return strcmp((char *)key, *(char **)name); }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,108
pdf_array_delete(fz_context *ctx, pdf_obj *obj, int i) { RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not an array (%s)", pdf_objkindstr(obj)); if (i < 0 || i >= ARRAY(obj)->len) fz_throw(ctx, FZ_ERROR_GENERIC, "index out of bounds"); pdf_drop_obj(ctx, ARRAY(obj)->items[i]); ARRAY(ob...
DoS
0
pdf_array_delete(fz_context *ctx, pdf_obj *obj, int i) { RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not an array (%s)", pdf_objkindstr(obj)); if (i < 0 || i >= ARRAY(obj)->len) fz_throw(ctx, FZ_ERROR_GENERIC, "index out of bounds"); pdf_drop_obj(ctx, ARRAY(obj)->items[i]); ARRAY(ob...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,109
pdf_array_find(fz_context *ctx, pdf_obj *arr, pdf_obj *obj) { int i, len; len = pdf_array_len(ctx, arr); for (i = 0; i < len; i++) if (!pdf_objcmp(ctx, pdf_array_get(ctx, arr, i), obj)) return i; return -1; }
DoS
0
pdf_array_find(fz_context *ctx, pdf_obj *arr, pdf_obj *obj) { int i, len; len = pdf_array_len(ctx, arr); for (i = 0; i < len; i++) if (!pdf_objcmp(ctx, pdf_array_get(ctx, arr, i), obj)) return i; return -1; }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,110
pdf_array_get(fz_context *ctx, pdf_obj *obj, int i) { RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) return NULL; if (i < 0 || i >= ARRAY(obj)->len) return NULL; return ARRAY(obj)->items[i]; }
DoS
0
pdf_array_get(fz_context *ctx, pdf_obj *obj, int i) { RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) return NULL; if (i < 0 || i >= ARRAY(obj)->len) return NULL; return ARRAY(obj)->items[i]; }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,111
pdf_array_grow(fz_context *ctx, pdf_obj_array *obj) { int i; int new_cap = (obj->cap * 3) / 2; obj->items = fz_resize_array(ctx, obj->items, new_cap, sizeof(pdf_obj*)); obj->cap = new_cap; for (i = obj->len ; i < obj->cap; i++) obj->items[i] = NULL; }
DoS
0
pdf_array_grow(fz_context *ctx, pdf_obj_array *obj) { int i; int new_cap = (obj->cap * 3) / 2; obj->items = fz_resize_array(ctx, obj->items, new_cap, sizeof(pdf_obj*)); obj->cap = new_cap; for (i = obj->len ; i < obj->cap; i++) obj->items[i] = NULL; }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,112
pdf_array_insert(fz_context *ctx, pdf_obj *obj, pdf_obj *item, int i) { RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not an array (%s)", pdf_objkindstr(obj)); if (i < 0 || i > ARRAY(obj)->len) fz_throw(ctx, FZ_ERROR_GENERIC, "index out of bounds"); if (!item) item = PDF_OBJ_NULL; ...
DoS
0
pdf_array_insert(fz_context *ctx, pdf_obj *obj, pdf_obj *item, int i) { RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not an array (%s)", pdf_objkindstr(obj)); if (i < 0 || i > ARRAY(obj)->len) fz_throw(ctx, FZ_ERROR_GENERIC, "index out of bounds"); if (!item) item = PDF_OBJ_NULL; ...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,113
pdf_array_insert_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *item, int i) { RESOLVE(obj); if (obj >= PDF_OBJ__LIMIT) { fz_try(ctx) pdf_array_insert(ctx, obj, item, i); fz_always(ctx) pdf_drop_obj(ctx, item); fz_catch(ctx) fz_rethrow(ctx); } }
DoS
0
pdf_array_insert_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *item, int i) { RESOLVE(obj); if (obj >= PDF_OBJ__LIMIT) { fz_try(ctx) pdf_array_insert(ctx, obj, item, i); fz_always(ctx) pdf_drop_obj(ctx, item); fz_catch(ctx) fz_rethrow(ctx); } }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,114
pdf_array_push(fz_context *ctx, pdf_obj *obj, pdf_obj *item) { RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not an array (%s)", pdf_objkindstr(obj)); if (!item) item = PDF_OBJ_NULL; prepare_object_for_alteration(ctx, obj, item); if (ARRAY(obj)->len + 1 > ARRAY(obj)->cap) pdf_array...
DoS
0
pdf_array_push(fz_context *ctx, pdf_obj *obj, pdf_obj *item) { RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not an array (%s)", pdf_objkindstr(obj)); if (!item) item = PDF_OBJ_NULL; prepare_object_for_alteration(ctx, obj, item); if (ARRAY(obj)->len + 1 > ARRAY(obj)->cap) pdf_array...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,115
pdf_array_push_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *item) { RESOLVE(obj); if (obj >= PDF_OBJ__LIMIT) { fz_try(ctx) pdf_array_push(ctx, obj, item); fz_always(ctx) pdf_drop_obj(ctx, item); fz_catch(ctx) fz_rethrow(ctx); } }
DoS
0
pdf_array_push_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *item) { RESOLVE(obj); if (obj >= PDF_OBJ__LIMIT) { fz_try(ctx) pdf_array_push(ctx, obj, item); fz_always(ctx) pdf_drop_obj(ctx, item); fz_catch(ctx) fz_rethrow(ctx); } }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,116
pdf_array_put_drop(fz_context *ctx, pdf_obj *obj, int i, pdf_obj *item) { pdf_array_put(ctx, obj, i, item); pdf_drop_obj(ctx, item); }
DoS
0
pdf_array_put_drop(fz_context *ctx, pdf_obj *obj, int i, pdf_obj *item) { pdf_array_put(ctx, obj, i, item); pdf_drop_obj(ctx, item); }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,117
pdf_copy_array(fz_context *ctx, pdf_obj *obj) { pdf_document *doc; pdf_obj *arr; int i; int n; RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not an array (%s)", pdf_objkindstr(obj)); doc = ARRAY(obj)->doc; n = pdf_array_len(ctx, obj); arr = pdf_new_array(ctx, doc, n); for (i = 0;...
DoS
0
pdf_copy_array(fz_context *ctx, pdf_obj *obj) { pdf_document *doc; pdf_obj *arr; int i; int n; RESOLVE(obj); if (!OBJ_IS_ARRAY(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not an array (%s)", pdf_objkindstr(obj)); doc = ARRAY(obj)->doc; n = pdf_array_len(ctx, obj); arr = pdf_new_array(ctx, doc, n); for (i = 0;...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,118
pdf_copy_dict(fz_context *ctx, pdf_obj *obj) { pdf_document *doc; pdf_obj *dict; int i, n; RESOLVE(obj); if (!OBJ_IS_DICT(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not a dict (%s)", pdf_objkindstr(obj)); doc = DICT(obj)->doc; n = pdf_dict_len(ctx, obj); dict = pdf_new_dict(ctx, doc, n); for (i = 0; i < n; i++...
DoS
0
pdf_copy_dict(fz_context *ctx, pdf_obj *obj) { pdf_document *doc; pdf_obj *dict; int i, n; RESOLVE(obj); if (!OBJ_IS_DICT(obj)) fz_throw(ctx, FZ_ERROR_GENERIC, "not a dict (%s)", pdf_objkindstr(obj)); doc = DICT(obj)->doc; n = pdf_dict_len(ctx, obj); dict = pdf_new_dict(ctx, doc, n); for (i = 0; i < n; i++...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,119
pdf_dict_find(fz_context *ctx, pdf_obj *obj, pdf_obj *key) { int len = DICT(obj)->len; if ((obj->flags & PDF_FLAGS_SORTED) && len > 0) { int l = 0; int r = len - 1; pdf_obj *k = DICT(obj)->items[r].k; if (k == key || (k >= PDF_OBJ__LIMIT && strcmp(NAME(k)->n, PDF_NAMES[(intptr_t)key]) < 0)) { return -1...
DoS
0
pdf_dict_find(fz_context *ctx, pdf_obj *obj, pdf_obj *key) { int len = DICT(obj)->len; if ((obj->flags & PDF_FLAGS_SORTED) && len > 0) { int l = 0; int r = len - 1; pdf_obj *k = DICT(obj)->items[r].k; if (k == key || (k >= PDF_OBJ__LIMIT && strcmp(NAME(k)->n, PDF_NAMES[(intptr_t)key]) < 0)) { return -1...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,120
pdf_dict_finds(fz_context *ctx, pdf_obj *obj, const char *key) { int len = DICT(obj)->len; if ((obj->flags & PDF_FLAGS_SORTED) && len > 0) { int l = 0; int r = len - 1; if (strcmp(pdf_to_name(ctx, DICT(obj)->items[r].k), key) < 0) { return -1 - (r+1); } while (l <= r) { int m = (l + r) >> 1; ...
DoS
0
pdf_dict_finds(fz_context *ctx, pdf_obj *obj, const char *key) { int len = DICT(obj)->len; if ((obj->flags & PDF_FLAGS_SORTED) && len > 0) { int l = 0; int r = len - 1; if (strcmp(pdf_to_name(ctx, DICT(obj)->items[r].k), key) < 0) { return -1 - (r+1); } while (l <= r) { int m = (l + r) >> 1; ...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,121
pdf_dict_get(fz_context *ctx, pdf_obj *obj, pdf_obj *key) { int i; RESOLVE(obj); if (!OBJ_IS_DICT(obj)) return NULL; if (!OBJ_IS_NAME(key)) return NULL; if (key < PDF_OBJ_NAME__LIMIT) i = pdf_dict_find(ctx, obj, key); else i = pdf_dict_finds(ctx, obj, pdf_to_name(ctx, key)); if (i >= 0) return DICT(o...
DoS
0
pdf_dict_get(fz_context *ctx, pdf_obj *obj, pdf_obj *key) { int i; RESOLVE(obj); if (!OBJ_IS_DICT(obj)) return NULL; if (!OBJ_IS_NAME(key)) return NULL; if (key < PDF_OBJ_NAME__LIMIT) i = pdf_dict_find(ctx, obj, key); else i = pdf_dict_finds(ctx, obj, pdf_to_name(ctx, key)); if (i >= 0) return DICT(o...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,122
pdf_dict_get_key(fz_context *ctx, pdf_obj *obj, int i) { RESOLVE(obj); if (!OBJ_IS_DICT(obj)) return NULL; if (i < 0 || i >= DICT(obj)->len) return NULL; return DICT(obj)->items[i].k; }
DoS
0
pdf_dict_get_key(fz_context *ctx, pdf_obj *obj, int i) { RESOLVE(obj); if (!OBJ_IS_DICT(obj)) return NULL; if (i < 0 || i >= DICT(obj)->len) return NULL; return DICT(obj)->items[i].k; }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,123
pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) { pdf_obj *v; v = pdf_dict_get(ctx, obj, key); if (v) return v; return pdf_dict_get(ctx, obj, abbrev); }
DoS
0
pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) { pdf_obj *v; v = pdf_dict_get(ctx, obj, key); if (v) return v; return pdf_dict_get(ctx, obj, abbrev); }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,124
pdf_dict_getl(fz_context *ctx, pdf_obj *obj, ...) { va_list keys; pdf_obj *key; va_start(keys, obj); while (obj != NULL && (key = va_arg(keys, pdf_obj *)) != NULL) { obj = pdf_dict_get(ctx, obj, key); } va_end(keys); return obj; }
DoS
0
pdf_dict_getl(fz_context *ctx, pdf_obj *obj, ...) { va_list keys; pdf_obj *key; va_start(keys, obj); while (obj != NULL && (key = va_arg(keys, pdf_obj *)) != NULL) { obj = pdf_dict_get(ctx, obj, key); } va_end(keys); return obj; }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,125
pdf_dict_getp(fz_context *ctx, pdf_obj *obj, const char *keys) { char buf[256]; char *k, *e; RESOLVE(obj); if (!OBJ_IS_DICT(obj)) return NULL; if (strlen(keys)+1 > 256) fz_throw(ctx, FZ_ERROR_GENERIC, "path too long"); strcpy(buf, keys); e = buf; while (*e && obj) { k = e; while (*e != '/' && *e != ...
DoS
0
pdf_dict_getp(fz_context *ctx, pdf_obj *obj, const char *keys) { char buf[256]; char *k, *e; RESOLVE(obj); if (!OBJ_IS_DICT(obj)) return NULL; if (strlen(keys)+1 > 256) fz_throw(ctx, FZ_ERROR_GENERIC, "path too long"); strcpy(buf, keys); e = buf; while (*e && obj) { k = e; while (*e != '/' && *e != ...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,126
pdf_dict_getsa(fz_context *ctx, pdf_obj *obj, const char *key, const char *abbrev) { pdf_obj *v; v = pdf_dict_gets(ctx, obj, key); if (v) return v; return pdf_dict_gets(ctx, obj, abbrev); }
DoS
0
pdf_dict_getsa(fz_context *ctx, pdf_obj *obj, const char *key, const char *abbrev) { pdf_obj *v; v = pdf_dict_gets(ctx, obj, key); if (v) return v; return pdf_dict_gets(ctx, obj, abbrev); }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,127
pdf_dict_grow(fz_context *ctx, pdf_obj *obj) { int i; int new_cap = (DICT(obj)->cap * 3) / 2; DICT(obj)->items = fz_resize_array(ctx, DICT(obj)->items, new_cap, sizeof(struct keyval)); DICT(obj)->cap = new_cap; for (i = DICT(obj)->len; i < DICT(obj)->cap; i++) { DICT(obj)->items[i].k = NULL; DICT(obj)->item...
DoS
0
pdf_dict_grow(fz_context *ctx, pdf_obj *obj) { int i; int new_cap = (DICT(obj)->cap * 3) / 2; DICT(obj)->items = fz_resize_array(ctx, DICT(obj)->items, new_cap, sizeof(struct keyval)); DICT(obj)->cap = new_cap; for (i = DICT(obj)->len; i < DICT(obj)->cap; i++) { DICT(obj)->items[i].k = NULL; DICT(obj)->item...
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,128
pdf_dict_put_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) { fz_try(ctx) }
DoS
0
pdf_dict_put_drop(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) { fz_try(ctx) }
@@ -1265,11 +1265,14 @@ pdf_dict_geta(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *abbrev) return pdf_dict_get(ctx, obj, abbrev); } -void -pdf_dict_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val) +static void +pdf_dict_get_put(fz_context *ctx, pdf_obj *obj, pdf_obj *key, pdf_obj *val,...
CWE-416
null
null
11,129
static void add_root(fz_context *ctx, pdf_obj *obj, pdf_obj ***roots, int *num_roots, int *max_roots) { if (*num_roots == *max_roots) { int new_max_roots = *max_roots * 2; if (new_max_roots == 0) new_max_roots = 4; *roots = fz_resize_array(ctx, *roots, new_max_roots, sizeof(**roots)); *max_roots = new_max_...
DoS
0
static void add_root(fz_context *ctx, pdf_obj *obj, pdf_obj ***roots, int *num_roots, int *max_roots) { if (*num_roots == *max_roots) { int new_max_roots = *max_roots * 2; if (new_max_roots == 0) new_max_roots = 4; *roots = fz_resize_array(ctx, *roots, new_max_roots, sizeof(**roots)); *max_roots = new_max_...
@@ -260,6 +260,27 @@ pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int stm_num) } } +static void +orphan_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj) +{ + if (doc->orphans_count == doc->orphans_max) + { + int new_max = (doc->orphans_max ? doc->orphans_max*2 : 32...
CWE-416
null
null
11,130
fz_catch(ctx) { pdf_drop_obj(ctx, encrypt); pdf_drop_obj(ctx, id); pdf_drop_obj(ctx, obj); pdf_drop_obj(ctx, info); fz_free(ctx, list); fz_rethrow(ctx); }
DoS
0
fz_catch(ctx) { pdf_drop_obj(ctx, encrypt); pdf_drop_obj(ctx, id); pdf_drop_obj(ctx, obj); pdf_drop_obj(ctx, info); fz_free(ctx, list); fz_rethrow(ctx); }
@@ -260,6 +260,27 @@ pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int stm_num) } } +static void +orphan_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj) +{ + if (doc->orphans_count == doc->orphans_max) + { + int new_max = (doc->orphans_max ? doc->orphans_max*2 : 32...
CWE-416
null
null
11,131
pdf_repair_obj(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf, fz_off_t *stmofsp, int *stmlenp, pdf_obj **encrypt, pdf_obj **id, pdf_obj **page, fz_off_t *tmpofs, pdf_obj **root) { fz_stream *file = doc->file; pdf_token tok; int stm_len; *stmofsp = 0; if (stmlenp) *stmlenp = -1; stm_len = 0; /* On entr...
DoS
0
pdf_repair_obj(fz_context *ctx, pdf_document *doc, pdf_lexbuf *buf, fz_off_t *stmofsp, int *stmlenp, pdf_obj **encrypt, pdf_obj **id, pdf_obj **page, fz_off_t *tmpofs, pdf_obj **root) { fz_stream *file = doc->file; pdf_token tok; int stm_len; *stmofsp = 0; if (stmlenp) *stmlenp = -1; stm_len = 0; /* On entr...
@@ -260,6 +260,27 @@ pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int stm_num) } } +static void +orphan_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj) +{ + if (doc->orphans_count == doc->orphans_max) + { + int new_max = (doc->orphans_max ? doc->orphans_max*2 : 32...
CWE-416
null
null
11,132
pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int stm_num) { pdf_obj *obj; fz_stream *stm = NULL; pdf_token tok; int i, n, count; pdf_lexbuf buf; fz_var(stm); pdf_lexbuf_init(ctx, &buf, PDF_LEXBUF_SMALL); fz_try(ctx) { obj = pdf_load_object(ctx, doc, stm_num); count = pdf_to_int(ctx, pdf_dict_...
DoS
0
pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int stm_num) { pdf_obj *obj; fz_stream *stm = NULL; pdf_token tok; int i, n, count; pdf_lexbuf buf; fz_var(stm); pdf_lexbuf_init(ctx, &buf, PDF_LEXBUF_SMALL); fz_try(ctx) { obj = pdf_load_object(ctx, doc, stm_num); count = pdf_to_int(ctx, pdf_dict_...
@@ -260,6 +260,27 @@ pdf_repair_obj_stm(fz_context *ctx, pdf_document *doc, int stm_num) } } +static void +orphan_object(fz_context *ctx, pdf_document *doc, pdf_obj *obj) +{ + if (doc->orphans_count == doc->orphans_max) + { + int new_max = (doc->orphans_max ? doc->orphans_max*2 : 32...
CWE-416
null
null
11,133
static void ensure_incremental_xref(fz_context *ctx, pdf_document *doc) { /* If there are as yet no incremental sections, or if the most recent * one has been used to sign a signature field, then we need a new one. * After a signing, any further document changes require a new increment */ if ((doc->num_incrementa...
DoS
0
static void ensure_incremental_xref(fz_context *ctx, pdf_document *doc) { /* If there are as yet no incremental sections, or if the most recent * one has been used to sign a signature field, then we need a new one. * After a signing, any further document changes require a new increment */ if ((doc->num_incrementa...
@@ -1620,6 +1620,12 @@ pdf_drop_document_imp(fz_context *ctx, pdf_document *doc) pdf_drop_resource_tables(ctx, doc); + for (i = 0; i < doc->orphans_count; i++) + { + pdf_drop_obj(ctx, doc->orphans[i]); + } + fz_free(ctx, d...
CWE-416
null
null
11,134
ensure_solid_xref(fz_context *ctx, pdf_document *doc, int num, int which) { pdf_xref *xref = &doc->xref_sections[which]; pdf_xref_subsec *sub = xref->subsec; pdf_xref_subsec *new_sub; if (num < xref->num_objects) num = xref->num_objects; if (sub != NULL && sub->next == NULL && sub->start == 0 && sub->len >= nu...
DoS
0
ensure_solid_xref(fz_context *ctx, pdf_document *doc, int num, int which) { pdf_xref *xref = &doc->xref_sections[which]; pdf_xref_subsec *sub = xref->subsec; pdf_xref_subsec *new_sub; if (num < xref->num_objects) num = xref->num_objects; if (sub != NULL && sub->next == NULL && sub->start == 0 && sub->len >= nu...
@@ -1620,6 +1620,12 @@ pdf_drop_document_imp(fz_context *ctx, pdf_document *doc) pdf_drop_resource_tables(ctx, doc); + for (i = 0; i < doc->orphans_count; i++) + { + pdf_drop_obj(ctx, doc->orphans[i]); + } + fz_free(ctx, d...
CWE-416
null
null
11,135
extend_xref_index(fz_context *ctx, pdf_document *doc, int newlen) { int i; doc->xref_index = fz_resize_array(ctx, doc->xref_index, newlen, sizeof(int)); for (i = doc->max_xref_len; i < newlen; i++) { doc->xref_index[i] = 0; } doc->max_xref_len = newlen; }
DoS
0
extend_xref_index(fz_context *ctx, pdf_document *doc, int newlen) { int i; doc->xref_index = fz_resize_array(ctx, doc->xref_index, newlen, sizeof(int)); for (i = doc->max_xref_len; i < newlen; i++) { doc->xref_index[i] = 0; } doc->max_xref_len = newlen; }
@@ -1620,6 +1620,12 @@ pdf_drop_document_imp(fz_context *ctx, pdf_document *doc) pdf_drop_resource_tables(ctx, doc); + for (i = 0; i < doc->orphans_count; i++) + { + pdf_drop_obj(ctx, doc->orphans[i]); + } + fz_free(ctx, d...
CWE-416
null
null
11,136
fz_skip_space(fz_context *ctx, fz_stream *stm) { do { int c = fz_peek_byte(ctx, stm); if (c > 32 && c != EOF) return; (void)fz_read_byte(ctx, stm); } while (1); }
DoS
0
fz_skip_space(fz_context *ctx, fz_stream *stm) { do { int c = fz_peek_byte(ctx, stm); if (c > 32 && c != EOF) return; (void)fz_read_byte(ctx, stm); } while (1); }
@@ -1620,6 +1620,12 @@ pdf_drop_document_imp(fz_context *ctx, pdf_document *doc) pdf_drop_resource_tables(ctx, doc); + for (i = 0; i < doc->orphans_count; i++) + { + pdf_drop_obj(ctx, doc->orphans[i]); + } + fz_free(ctx, d...
CWE-416
null
null
11,137
static int fz_skip_string(fz_context *ctx, fz_stream *stm, const char *str) { while (*str) { int c = fz_peek_byte(ctx, stm); if (c == EOF || c != *str++) return 1; (void)fz_read_byte(ctx, stm); } return 0; }
DoS
0
static int fz_skip_string(fz_context *ctx, fz_stream *stm, const char *str) { while (*str) { int c = fz_peek_byte(ctx, stm); if (c == EOF || c != *str++) return 1; (void)fz_read_byte(ctx, stm); } return 0; }
@@ -1620,6 +1620,12 @@ pdf_drop_document_imp(fz_context *ctx, pdf_document *doc) pdf_drop_resource_tables(ctx, doc); + for (i = 0; i < doc->orphans_count; i++) + { + pdf_drop_obj(ctx, doc->orphans[i]); + } + fz_free(ctx, d...
CWE-416
null
null
11,138
static inline int iswhite(int ch) { return ch == '\000' || ch == '\011' || ch == '\012' || ch == '\014' || ch == '\015' || ch == '\040'; }
DoS
0
static inline int iswhite(int ch) { return ch == '\000' || ch == '\011' || ch == '\012' || ch == '\014' || ch == '\015' || ch == '\040'; }
@@ -1620,6 +1620,12 @@ pdf_drop_document_imp(fz_context *ctx, pdf_document *doc) pdf_drop_resource_tables(ctx, doc); + for (i = 0; i < doc->orphans_count; i++) + { + pdf_drop_obj(ctx, doc->orphans[i]); + } + fz_free(ctx, d...
CWE-416
null
null
11,139
int do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragment) { unsigned char *p, *pseq; int i, mac_size, clear = 0; int prefix_len = 0; int eivlen; SSL3_RECORD wr; SSL3_BUFFER *wb; SSL_SESSION *sess; wb = &s->rlayer.wbuf[...
DoS
0
int do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragment) { unsigned char *p, *pseq; int i, mac_size, clear = 0; int prefix_len = 0; int eivlen; SSL3_RECORD wr; SSL3_BUFFER *wb; SSL_SESSION *sess; wb = &s->rlayer.wbuf[...
@@ -443,6 +443,14 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } } + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr) != SSL3_RT_ALERT + && SSL3...
CWE-400
null
null
11,140
DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, unsigned int *is_next_epoch) { *is_next_epoch = 0; /* In current epoch, accept HM, CCS, DATA, & ALERT */ if (rr->epoch == s->rlayer.d->r_epoch) return &s->rlayer.d->bitmap; /* * Only HM and ALERT messa...
DoS
0
DTLS1_BITMAP *dtls1_get_bitmap(SSL *s, SSL3_RECORD *rr, unsigned int *is_next_epoch) { *is_next_epoch = 0; /* In current epoch, accept HM, CCS, DATA, & ALERT */ if (rr->epoch == s->rlayer.d->r_epoch) return &s->rlayer.d->bitmap; /* * Only HM and ALERT messa...
@@ -443,6 +443,14 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } } + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr) != SSL3_RT_ALERT + && SSL3...
CWE-400
null
null
11,141
void dtls1_reset_seq_numbers(SSL *s, int rw) { unsigned char *seq; unsigned int seq_bytes = sizeof(s->rlayer.read_sequence); if (rw & SSL3_CC_READ) { seq = s->rlayer.read_sequence; s->rlayer.d->r_epoch++; memcpy(&s->rlayer.d->bitmap, &s->rlayer.d->next_bitmap, sizeof(...
DoS
0
void dtls1_reset_seq_numbers(SSL *s, int rw) { unsigned char *seq; unsigned int seq_bytes = sizeof(s->rlayer.read_sequence); if (rw & SSL3_CC_READ) { seq = s->rlayer.read_sequence; s->rlayer.d->r_epoch++; memcpy(&s->rlayer.d->bitmap, &s->rlayer.d->next_bitmap, sizeof(...
@@ -443,6 +443,14 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } } + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr) != SSL3_RT_ALERT + && SSL3...
CWE-400
null
null
11,142
static int have_handshake_fragment(SSL *s, int type, unsigned char *buf, int len) { if ((type == SSL3_RT_HANDSHAKE) && (s->rlayer.d->handshake_fragment_len > 0)) /* (partially) satisfy request from storage */ { unsigned char *src = s->rlayer.d->handsha...
DoS
0
static int have_handshake_fragment(SSL *s, int type, unsigned char *buf, int len) { if ((type == SSL3_RT_HANDSHAKE) && (s->rlayer.d->handshake_fragment_len > 0)) /* (partially) satisfy request from storage */ { unsigned char *src = s->rlayer.d->handsha...
@@ -443,6 +443,14 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } } + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr) != SSL3_RT_ALERT + && SSL3...
CWE-400
null
null
11,143
void RECORD_LAYER_clear(RECORD_LAYER *rl) { unsigned int pipes; rl->rstate = SSL_ST_READ_HEADER; /* * Do I need to clear read_ahead? As far as I can tell read_ahead did not * previously get reset by SSL_clear...so I'll keep it that way..but is * that right? */ rl->packet = NULL; ...
DoS
0
void RECORD_LAYER_clear(RECORD_LAYER *rl) { unsigned int pipes; rl->rstate = SSL_ST_READ_HEADER; /* * Do I need to clear read_ahead? As far as I can tell read_ahead did not * previously get reset by SSL_clear...so I'll keep it that way..but is * that right? */ rl->packet = NULL; ...
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,144
void RECORD_LAYER_init(RECORD_LAYER *rl, SSL *s) { rl->s = s; RECORD_LAYER_set_first_record(&s->rlayer); SSL3_RECORD_clear(rl->rrec, SSL_MAX_PIPELINES); }
DoS
0
void RECORD_LAYER_init(RECORD_LAYER *rl, SSL *s) { rl->s = s; RECORD_LAYER_set_first_record(&s->rlayer); SSL3_RECORD_clear(rl->rrec, SSL_MAX_PIPELINES); }
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,145
int RECORD_LAYER_read_pending(const RECORD_LAYER *rl) { return SSL3_BUFFER_get_left(&rl->rbuf) != 0; }
DoS
0
int RECORD_LAYER_read_pending(const RECORD_LAYER *rl) { return SSL3_BUFFER_get_left(&rl->rbuf) != 0; }
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,146
void RECORD_LAYER_release(RECORD_LAYER *rl) { if (SSL3_BUFFER_is_initialised(&rl->rbuf)) ssl3_release_read_buffer(rl->s); if (rl->numwpipes > 0) ssl3_release_write_buffer(rl->s); SSL3_RECORD_release(rl->rrec, SSL_MAX_PIPELINES); }
DoS
0
void RECORD_LAYER_release(RECORD_LAYER *rl) { if (SSL3_BUFFER_is_initialised(&rl->rbuf)) ssl3_release_read_buffer(rl->s); if (rl->numwpipes > 0) ssl3_release_write_buffer(rl->s); SSL3_RECORD_release(rl->rrec, SSL_MAX_PIPELINES); }
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,147
void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl) { memset(rl->read_sequence, 0, sizeof(rl->read_sequence)); }
DoS
0
void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl) { memset(rl->read_sequence, 0, sizeof(rl->read_sequence)); }
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,148
int RECORD_LAYER_set_data(RECORD_LAYER *rl, const unsigned char *buf, int len) { rl->packet_length = len; if (len != 0) { rl->rstate = SSL_ST_READ_HEADER; if (!SSL3_BUFFER_is_initialised(&rl->rbuf)) if (!ssl3_setup_read_buffer(rl->s)) return 0; } rl->packet =...
DoS
0
int RECORD_LAYER_set_data(RECORD_LAYER *rl, const unsigned char *buf, int len) { rl->packet_length = len; if (len != 0) { rl->rstate = SSL_ST_READ_HEADER; if (!SSL3_BUFFER_is_initialised(&rl->rbuf)) if (!ssl3_setup_read_buffer(rl->s)) return 0; } rl->packet =...
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,149
int RECORD_LAYER_write_pending(const RECORD_LAYER *rl) { return (rl->numwpipes > 0) && SSL3_BUFFER_get_left(&rl->wbuf[rl->numwpipes - 1]) != 0; }
DoS
0
int RECORD_LAYER_write_pending(const RECORD_LAYER *rl) { return (rl->numwpipes > 0) && SSL3_BUFFER_get_left(&rl->wbuf[rl->numwpipes - 1]) != 0; }
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,150
void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len) { ctx->default_read_buf_len = len; }
DoS
0
void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len) { ctx->default_read_buf_len = len; }
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,151
const char *SSL_rstate_string_long(const SSL *s) { switch (s->rlayer.rstate) { case SSL_ST_READ_HEADER: return "read header"; case SSL_ST_READ_BODY: return "read body"; case SSL_ST_READ_DONE: return "read done"; default: return "unknown"; } }
DoS
0
const char *SSL_rstate_string_long(const SSL *s) { switch (s->rlayer.rstate) { case SSL_ST_READ_HEADER: return "read header"; case SSL_ST_READ_BODY: return "read body"; case SSL_ST_READ_DONE: return "read done"; default: return "unknown"; } }
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,152
void SSL_set_default_read_buffer_len(SSL *s, size_t len) { SSL3_BUFFER_set_default_len(RECORD_LAYER_get_rbuf(&s->rlayer), len); }
DoS
0
void SSL_set_default_read_buffer_len(SSL *s, size_t len) { SSL3_BUFFER_set_default_len(RECORD_LAYER_get_rbuf(&s->rlayer), len); }
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,153
int do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int *pipelens, unsigned int numpipes, int create_empty_fragment) { unsigned char *outbuf[SSL_MAX_PIPELINES], *plen[SSL_MAX_PIPELINES]; SSL3_RECORD wr[SSL_MAX_PIPELINES]; int i, mac_size, clear = 0; ...
DoS
0
int do_ssl3_write(SSL *s, int type, const unsigned char *buf, unsigned int *pipelens, unsigned int numpipes, int create_empty_fragment) { unsigned char *outbuf[SSL_MAX_PIPELINES], *plen[SSL_MAX_PIPELINES]; SSL3_RECORD wr[SSL_MAX_PIPELINES]; int i, mac_size, clear = 0; ...
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,154
int ssl3_pending(const SSL *s) { unsigned int i; int num = 0; if (s->rlayer.rstate == SSL_ST_READ_BODY) return 0; for (i = 0; i < RECORD_LAYER_get_numrpipes(&s->rlayer); i++) { if (SSL3_RECORD_get_type(&s->rlayer.rrec[i]) != SSL3_RT_APPLICATION_DATA) return 0; ...
DoS
0
int ssl3_pending(const SSL *s) { unsigned int i; int num = 0; if (s->rlayer.rstate == SSL_ST_READ_BODY) return 0; for (i = 0; i < RECORD_LAYER_get_numrpipes(&s->rlayer); i++) { if (SSL3_RECORD_get_type(&s->rlayer.rrec[i]) != SSL3_RT_APPLICATION_DATA) return 0; ...
@@ -1063,6 +1063,14 @@ int ssl3_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf, } while (num_recs == 0); rr = &rr[curr_rec]; + /* + * Reset the count of consecutive warning alerts if we've got a non-empty + * record that isn't an alert. + */ + if (SSL3_RECORD_get_type(rr)...
CWE-400
null
null
11,155
dict_real_result(i_ctx_t *i_ctx_p, ref * pdict, const char *kstr, double val) { int code = 0; ref *ignore; if (dict_find_string(pdict, kstr, &ignore) > 0) { ref rval; check_dict_write(*pdict); make_real(&rval, val); code = idict_put_string(pdict, kstr, &rval); } ret...
DoS Exec Code
0
dict_real_result(i_ctx_t *i_ctx_p, ref * pdict, const char *kstr, double val) { int code = 0; ref *ignore; if (dict_find_string(pdict, kstr, &ignore) > 0) { ref rval; check_dict_write(*pdict); make_real(&rval, val); code = idict_put_string(pdict, kstr, &rval); } ret...
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,156
dict_spot_params(const ref * pdict, gs_spot_halftone * psp, ref * psproc, ref * ptproc, gs_memory_t *mem) { int code; check_dict_read(*pdict); if ((code = dict_float_param(pdict, "Frequency", 0.0, &psp->screen.frequency)) != 0 || (code = dict_float_...
DoS Exec Code
0
dict_spot_params(const ref * pdict, gs_spot_halftone * psp, ref * psproc, ref * ptproc, gs_memory_t *mem) { int code; check_dict_read(*pdict); if ((code = dict_float_param(pdict, "Frequency", 0.0, &psp->screen.frequency)) != 0 || (code = dict_float_...
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,157
dict_spot_results(i_ctx_t *i_ctx_p, ref * pdict, const gs_spot_halftone * psp) { int code; code = dict_real_result(i_ctx_p, pdict, "ActualFrequency", psp->screen.actual_frequency); if (code < 0) return code; return dict_real_result(i_ctx_p, pdict, "ActualAngle", ...
DoS Exec Code
0
dict_spot_results(i_ctx_t *i_ctx_p, ref * pdict, const gs_spot_halftone * psp) { int code; code = dict_real_result(i_ctx_p, pdict, "ActualFrequency", psp->screen.actual_frequency); if (code < 0) return code; return dict_real_result(i_ctx_p, pdict, "ActualAngle", ...
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,158
dict_threshold2_params(const ref * pdict, gs_threshold2_halftone * ptp, ref * ptproc, gs_memory_t *mem) { ref *tstring; int code = dict_threshold_common_params(pdict, (gs_threshold_halftone_common *)ptp, &ts...
DoS Exec Code
0
dict_threshold2_params(const ref * pdict, gs_threshold2_halftone * ptp, ref * ptproc, gs_memory_t *mem) { ref *tstring; int code = dict_threshold_common_params(pdict, (gs_threshold_halftone_common *)ptp, &ts...
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,159
dict_threshold_common_params(const ref * pdict, gs_threshold_halftone_common * ptp, ref **pptstring, ref *ptproc) { int code; check_dict_read(*pdict); if ((code = dict_int_param(pdict, "Width", 1, 0x7fff, -1, &ptp->wid...
DoS Exec Code
0
dict_threshold_common_params(const ref * pdict, gs_threshold_halftone_common * ptp, ref **pptstring, ref *ptproc) { int code; check_dict_read(*pdict); if ((code = dict_int_param(pdict, "Width", 1, 0x7fff, -1, &ptp->wid...
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,160
dict_threshold_params(const ref * pdict, gs_threshold_halftone * ptp, ref * ptproc) { ref *tstring; int code = dict_threshold_common_params(pdict, (gs_threshold_halftone_common *)ptp, &tstring, ptproc); ...
DoS Exec Code
0
dict_threshold_params(const ref * pdict, gs_threshold_halftone * ptp, ref * ptproc) { ref *tstring; int code = dict_threshold_common_params(pdict, (gs_threshold_halftone_common *)ptp, &tstring, ptproc); ...
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,161
gs_get_colorname_string(const gs_memory_t *mem, gs_separation_name colorname_index, unsigned char **ppstr, unsigned int *pname_size) { ref nref; name_index_ref(mem, colorname_index, &nref); name_string_ref(mem, &nref, &nref); return obj_string_data(mem, &nref, (const unsigned ch...
DoS Exec Code
0
gs_get_colorname_string(const gs_memory_t *mem, gs_separation_name colorname_index, unsigned char **ppstr, unsigned int *pname_size) { ref nref; name_index_ref(mem, colorname_index, &nref); name_string_ref(mem, &nref, &nref); return obj_string_data(mem, &nref, (const unsigned ch...
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,162
sethalftone_cleanup(i_ctx_t *i_ctx_p) { gx_device_halftone *pdht = r_ptr(&esp[4], gx_device_halftone); gs_halftone *pht = r_ptr(&esp[3], gs_halftone); gs_free_object(pdht->rc.memory, pdht, "sethalftone_cleanup(device halftone)"); gs_free_object(pht->rc.memory, pht, ...
DoS Exec Code
0
sethalftone_cleanup(i_ctx_t *i_ctx_p) { gx_device_halftone *pdht = r_ptr(&esp[4], gx_device_halftone); gs_halftone *pht = r_ptr(&esp[3], gs_halftone); gs_free_object(pdht->rc.memory, pdht, "sethalftone_cleanup(device halftone)"); gs_free_object(pht->rc.memory, pht, ...
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,163
spot1_dummy(double x, double y) { return (x + y) / 2; }
DoS Exec Code
0
spot1_dummy(double x, double y) { return (x + y) / 2; }
@@ -82,14 +82,22 @@ zsethalftone5(i_ctx_t *i_ctx_p) gs_memory_t *mem; uint edepth = ref_stack_count(&e_stack); int npop = 2; - int dict_enum = dict_first(op); + int dict_enum; ref rvalue[2]; int cname, colorant_number; byte * pname; uint name_size; int halftonetype, type = ...
CWE-704
null
null
11,164
zstatus(i_ctx_t *i_ctx_p) { os_ptr op = osp; switch (r_type(op)) { case t_file: { stream *s; make_bool(op, (file_is_valid(s, op) ? 1 : 0)); } return 0; case t_string: { gs_parsed_file_name_t pname; ...
Bypass +Info
0
zstatus(i_ctx_t *i_ctx_p) { os_ptr op = osp; switch (r_type(op)) { case t_file: { stream *s; make_bool(op, (file_is_valid(s, op) ? 1 : 0)); } return 0; case t_string: { gs_parsed_file_name_t pname; ...
@@ -1081,6 +1081,9 @@ lib_file_open(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx gs_main_instance *minst = get_minst_from_memory(mem); int code; + if (i_ctx_p && starting_arg_file) + i_ctx_p->starting_arg_file = false; + /* when starting arg files (@ files) iodev_default...
CWE-200
null
null
11,165
dump_icc_buffer(int buffersize, char filename[],byte *Buffer) { char full_file_name[50]; FILE *fid; gs_sprintf(full_file_name,"%d)%s_debug.icc",global_icc_index,filename); fid = gp_fopen(full_file_name,"wb"); fwrite(Buffer,sizeof(unsigned char),buffersize,fid); fclose(fid); }
Exec Code
0
dump_icc_buffer(int buffersize, char filename[],byte *Buffer) { char full_file_name[50]; FILE *fid; gs_sprintf(full_file_name,"%d)%s_debug.icc",global_icc_index,filename); fid = gp_fopen(full_file_name,"wb"); fwrite(Buffer,sizeof(unsigned char),buffersize,fid); fclose(fid); }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,166
gs_currentdefaultgrayicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = DEFAULT_GRAY_ICC; if (pgs->icc_manager->default_gray == NULL) { pval->data = (const byte *) rfs; pval->persistent = true; } else { pval->data = (const byte *) (pgs->icc_manager->...
Exec Code
0
gs_currentdefaultgrayicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = DEFAULT_GRAY_ICC; if (pgs->icc_manager->default_gray == NULL) { pval->data = (const byte *) rfs; pval->persistent = true; } else { pval->data = (const byte *) (pgs->icc_manager->...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,167
gs_currentdevicenicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = ""; /*FIXME: This should return the entire list !!! */ /* Just return the first one for now */ if (pgs->icc_manager->device_n == NULL) { pval->data = (const byte *) rfs; pval-...
Exec Code
0
gs_currentdevicenicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = ""; /*FIXME: This should return the entire list !!! */ /* Just return the first one for now */ if (pgs->icc_manager->device_n == NULL) { pval->data = (const byte *) rfs; pval-...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,168
gs_currenticcdirectory(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = DEFAULT_DIR_ICC; /* as good as any other */ const gs_lib_ctx_t *lib_ctx = pgs->memory->gs_lib_ctx; if (lib_ctx->profiledir == NULL) { pval->data = (const byte *)rfs; pval->size = strlen(...
Exec Code
0
gs_currenticcdirectory(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = DEFAULT_DIR_ICC; /* as good as any other */ const gs_lib_ctx_t *lib_ctx = pgs->memory->gs_lib_ctx; if (lib_ctx->profiledir == NULL) { pval->data = (const byte *)rfs; pval->size = strlen(...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,169
gs_currentlabicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = LAB_ICC; pval->data = (const byte *)( (pgs->icc_manager->lab_profile == NULL) ? rfs : pgs->icc_manager->lab_profile->name); pval->size = strlen((const char *)pval->data); pval->persi...
Exec Code
0
gs_currentlabicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = LAB_ICC; pval->data = (const byte *)( (pgs->icc_manager->lab_profile == NULL) ? rfs : pgs->icc_manager->lab_profile->name); pval->size = strlen((const char *)pval->data); pval->persi...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,170
gs_currentnamedicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = ""; if (pgs->icc_manager->device_named == NULL) { pval->data = (const byte *) rfs; pval->persistent = true; } else { pval->data = (const byte *) (pgs->icc_manager->device_named->name);...
Exec Code
0
gs_currentnamedicc(const gs_gstate * pgs, gs_param_string * pval) { static const char *const rfs = ""; if (pgs->icc_manager->device_named == NULL) { pval->data = (const byte *) rfs; pval->persistent = true; } else { pval->data = (const byte *) (pgs->icc_manager->device_named->name);...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,171
gs_currentoverrideicc(const gs_gstate *pgs) { if (pgs->icc_manager != NULL) { return pgs->icc_manager->override_internal; } else { return false; } }
Exec Code
0
gs_currentoverrideicc(const gs_gstate *pgs) { if (pgs->icc_manager != NULL) { return pgs->icc_manager->override_internal; } else { return false; } }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,172
gs_currentsrcgtagicc(const gs_gstate * pgs, gs_param_string * pval) { if (pgs->icc_manager->srcgtag_profile == NULL) { pval->data = NULL; pval->size = 0; pval->persistent = true; } else { pval->data = (byte *)pgs->icc_manager->srcgtag_profile->name; pval->size = strlen((c...
Exec Code
0
gs_currentsrcgtagicc(const gs_gstate * pgs, gs_param_string * pval) { if (pgs->icc_manager->srcgtag_profile == NULL) { pval->data = NULL; pval->size = 0; pval->persistent = true; } else { pval->data = (byte *)pgs->icc_manager->srcgtag_profile->name; pval->size = strlen((c...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,173
gs_setdefaultcmykicc(const gs_gstate * pgs, gs_param_string * pval) { int code; char* pname; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; pname = (char *)gs_alloc_bytes(mem, namelen, "set_default_cmyk_icc"); if (pname == NULL) return_error(g...
Exec Code
0
gs_setdefaultcmykicc(const gs_gstate * pgs, gs_param_string * pval) { int code; char* pname; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; pname = (char *)gs_alloc_bytes(mem, namelen, "set_default_cmyk_icc"); if (pname == NULL) return_error(g...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,174
gs_setdefaultgrayicc(const gs_gstate * pgs, gs_param_string * pval) { int code; char *pname; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; bool not_initialized; /* Detect if this is our first time in here. If so, then we need to reset up the default gray color spaces tha...
Exec Code
0
gs_setdefaultgrayicc(const gs_gstate * pgs, gs_param_string * pval) { int code; char *pname; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; bool not_initialized; /* Detect if this is our first time in here. If so, then we need to reset up the default gray color spaces tha...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,175
gs_setdevicenprofileicc(const gs_gstate * pgs, gs_param_string * pval) { int code = 0; char *pname, *pstr, *pstrend, *last = NULL; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; /* Check if it was "NULL" */ if (pval->size != 0) { /* The DeviceN name can have multiple file...
Exec Code
0
gs_setdevicenprofileicc(const gs_gstate * pgs, gs_param_string * pval) { int code = 0; char *pname, *pstr, *pstrend, *last = NULL; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; /* Check if it was "NULL" */ if (pval->size != 0) { /* The DeviceN name can have multiple file...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,176
gs_seticcdirectory(const gs_gstate * pgs, gs_param_string * pval) { char *pname; int namelen = (pval->size)+1; const gs_memory_t *mem = pgs->memory; /* Check if it was "NULL" */ if (pval->size != 0 ) { pname = (char *)gs_alloc_bytes((gs_memory_t *)mem, namelen, ...
Exec Code
0
gs_seticcdirectory(const gs_gstate * pgs, gs_param_string * pval) { char *pname; int namelen = (pval->size)+1; const gs_memory_t *mem = pgs->memory; /* Check if it was "NULL" */ if (pval->size != 0 ) { pname = (char *)gs_alloc_bytes((gs_memory_t *)mem, namelen, ...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,177
gs_setnamedprofileicc(const gs_gstate * pgs, gs_param_string * pval) { int code; char* pname; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; /* Check if it was "NULL" */ if (pval->size != 0) { pname = (char *)gs_alloc_bytes(mem, namelen, "...
Exec Code
0
gs_setnamedprofileicc(const gs_gstate * pgs, gs_param_string * pval) { int code; char* pname; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; /* Check if it was "NULL" */ if (pval->size != 0) { pname = (char *)gs_alloc_bytes(mem, namelen, "...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,178
gs_setoverrideicc(gs_gstate *pgs, bool value) { if (pgs->icc_manager != NULL) { pgs->icc_manager->override_internal = value; } }
Exec Code
0
gs_setoverrideicc(gs_gstate *pgs, bool value) { if (pgs->icc_manager != NULL) { pgs->icc_manager->override_internal = value; } }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,179
gs_setsrcgtagicc(const gs_gstate * pgs, gs_param_string * pval) { int code; char *pname; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; if (pval->size == 0) return 0; pname = (char *)gs_alloc_bytes(mem, namelen, "set_srcgtag_icc"); if (pname == NULL) return_error(gs_e...
Exec Code
0
gs_setsrcgtagicc(const gs_gstate * pgs, gs_param_string * pval) { int code; char *pname; int namelen = (pval->size)+1; gs_memory_t *mem = pgs->memory; if (pval->size == 0) return 0; pname = (char *)gs_alloc_bytes(mem, namelen, "set_srcgtag_icc"); if (pname == NULL) return_error(gs_e...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,180
void gscms_set_icc_range(cmm_profile_t **icc_profile) { int num_comp = (*icc_profile)->num_comps; int k; for ( k = 0; k < num_comp; k++) { (*icc_profile)->Range.ranges[k].rmin = 0.0; (*icc_profile)->Range.ranges[k].rmax = 1.0; } }
Exec Code
0
void gscms_set_icc_range(cmm_profile_t **icc_profile) { int num_comp = (*icc_profile)->num_comps; int k; for ( k = 0; k < num_comp; k++) { (*icc_profile)->Range.ranges[k].rmin = 0.0; (*icc_profile)->Range.ranges[k].rmax = 1.0; } }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,181
gsicc_check_device_link(cmm_profile_t *icc_profile) { bool value; value = gscms_is_device_link(icc_profile->profile_handle); icc_profile->isdevlink = value; return value; }
Exec Code
0
gsicc_check_device_link(cmm_profile_t *icc_profile) { bool value; value = gscms_is_device_link(icc_profile->profile_handle); icc_profile->isdevlink = value; return value; }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,182
gsicc_clone_profile(cmm_profile_t *source, cmm_profile_t **destination, gs_memory_t *memory) { cmm_profile_t *des = gsicc_profile_new(NULL, memory, source->name, source->name_length); if (des == NULL) return gs_throw(gs_error_VMerror, "Profile clone failed"); des->buffer...
Exec Code
0
gsicc_clone_profile(cmm_profile_t *source, cmm_profile_t **destination, gs_memory_t *memory) { cmm_profile_t *des = gsicc_profile_new(NULL, memory, source->name, source->name_length); if (des == NULL) return gs_throw(gs_error_VMerror, "Profile clone failed"); des->buffer...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,183
gsicc_extract_profile(gs_graphics_type_tag_t graphics_type_tag, cmm_dev_profile_t *profile_struct, cmm_profile_t **profile, gsicc_rendering_param_t *render_cond) { switch (graphics_type_tag & ~GS_DEVICE_ENCODES_TAGS) { case GS_UNKNOWN_TAG: case GS_UNTOUC...
Exec Code
0
gsicc_extract_profile(gs_graphics_type_tag_t graphics_type_tag, cmm_dev_profile_t *profile_struct, cmm_profile_t **profile, gsicc_rendering_param_t *render_cond) { switch (graphics_type_tag & ~GS_DEVICE_ENCODES_TAGS) { case GS_UNKNOWN_TAG: case GS_UNTOUC...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,184
gsicc_fill_srcgtag_item(gsicc_rendering_param_t *r_params, char **pstrlast, bool cmyk) { char *curr_ptr; int blackptcomp; int or_icc, preserve_k; int ri; /* Get the intent */ curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast); if (sscanf(curr_ptr, "%d", &ri) != 1) return_error(gs_er...
Exec Code
0
gsicc_fill_srcgtag_item(gsicc_rendering_param_t *r_params, char **pstrlast, bool cmyk) { char *curr_ptr; int blackptcomp; int or_icc, preserve_k; int ri; /* Get the intent */ curr_ptr = gs_strtok(NULL, "\t,\32\n\r", pstrlast); if (sscanf(curr_ptr, "%d", &ri) != 1) return_error(gs_er...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,185
gsicc_finddevicen(const gs_color_space *pcs, gsicc_manager_t *icc_manager) { int k,j,i; gsicc_devicen_entry_t *curr_entry; int num_comps; const gs_separation_name *names = pcs->params.device_n.names; unsigned char *pname; unsigned int name_size; gsicc_devicen_t *devicen_profiles = icc_manage...
Exec Code
0
gsicc_finddevicen(const gs_color_space *pcs, gsicc_manager_t *icc_manager) { int k,j,i; gsicc_devicen_entry_t *curr_entry; int num_comps; const gs_separation_name *names = pcs->params.device_n.names; unsigned char *pname; unsigned int name_size; gsicc_devicen_t *devicen_profiles = icc_manage...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,186
gsicc_get_default_type(cmm_profile_t *profile_data) { switch (profile_data->default_match) { case DEFAULT_GRAY: return gs_color_space_index_DeviceGray; case DEFAULT_RGB: return gs_color_space_index_DeviceRGB; case DEFAULT_CMYK: return gs_color_space_index_...
Exec Code
0
gsicc_get_default_type(cmm_profile_t *profile_data) { switch (profile_data->default_match) { case DEFAULT_GRAY: return gs_color_space_index_DeviceGray; case DEFAULT_RGB: return gs_color_space_index_DeviceRGB; case DEFAULT_CMYK: return gs_color_space_index_...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,187
char* gsicc_get_dev_icccolorants(cmm_dev_profile_t *dev_profile) { if (dev_profile == NULL || dev_profile->spotnames == NULL || dev_profile->spotnames->name_str == NULL) return 0; else return dev_profile->spotnames->name_str; }
Exec Code
0
char* gsicc_get_dev_icccolorants(cmm_dev_profile_t *dev_profile) { if (dev_profile == NULL || dev_profile->spotnames == NULL || dev_profile->spotnames->name_str == NULL) return 0; else return dev_profile->spotnames->name_str; }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,188
gsicc_get_device_class(cmm_profile_t *icc_profile) { return gscms_get_device_class(icc_profile->profile_handle); }
Exec Code
0
gsicc_get_device_class(cmm_profile_t *icc_profile) { return gscms_get_device_class(icc_profile->profile_handle); }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,189
gsicc_get_devicen_names(cmm_profile_t *icc_profile, gs_memory_t *memory) { /* The names are contained in the named color tag. We use the CMM to extract the data from the profile */ if (icc_profile->profile_handle == NULL) { if (icc_profile->buffer != NULL) { icc_profile...
Exec Code
0
gsicc_get_devicen_names(cmm_profile_t *icc_profile, gs_memory_t *memory) { /* The names are contained in the named color tag. We use the CMM to extract the data from the profile */ if (icc_profile->profile_handle == NULL) { if (icc_profile->buffer != NULL) { icc_profile...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,190
gsicc_get_profile_handle_buffer(unsigned char *buffer, int profile_size, gs_memory_t *memory) { gcmmhprofile_t profile_handle = NULL; if( buffer != NULL) { if (profile_size < ICC_HEADER_SIZE) { return 0; } profile_handle = gscms_get_profile_handle_mem(memory->non_gc_me...
Exec Code
0
gsicc_get_profile_handle_buffer(unsigned char *buffer, int profile_size, gs_memory_t *memory) { gcmmhprofile_t profile_handle = NULL; if( buffer != NULL) { if (profile_size < ICC_HEADER_SIZE) { return 0; } profile_handle = gscms_get_profile_handle_mem(memory->non_gc_me...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,191
gsicc_get_profile_handle_file(const char* pname, int namelen, gs_memory_t *mem) { cmm_profile_t *result; stream* str; int code; /* First see if we can get the stream. NOTE icc directory not used! */ code = gsicc_open_search(pname, namelen, mem, NULL, 0, &str); if (code < 0 || str == NULL) { ...
Exec Code
0
gsicc_get_profile_handle_file(const char* pname, int namelen, gs_memory_t *mem) { cmm_profile_t *result; stream* str; int code; /* First see if we can get the stream. NOTE icc directory not used! */ code = gsicc_open_search(pname, namelen, mem, NULL, 0, &str); if (code < 0 || str == NULL) { ...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,192
gsicc_get_srcprofile(gsicc_colorbuffer_t data_cs, gs_graphics_type_tag_t graphics_type_tag, cmm_srcgtag_profile_t *srcgtag_profile, cmm_profile_t **profile, gsicc_rendering_param_t *render_cond) { (*profile) = NULL; (*render_cond).rendering_intent =...
Exec Code
0
gsicc_get_srcprofile(gsicc_colorbuffer_t data_cs, gs_graphics_type_tag_t graphics_type_tag, cmm_srcgtag_profile_t *srcgtag_profile, cmm_profile_t **profile, gsicc_rendering_param_t *render_cond) { (*profile) = NULL; (*render_cond).rendering_intent =...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,193
unsigned int gsicc_getprofilesize(unsigned char *buffer) { return ( (buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3] ); }
Exec Code
0
unsigned int gsicc_getprofilesize(unsigned char *buffer) { return ( (buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3] ); }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,194
gsicc_getsrc_channel_count(cmm_profile_t *icc_profile) { return gscms_get_input_channel_count(icc_profile->profile_handle); }
Exec Code
0
gsicc_getsrc_channel_count(cmm_profile_t *icc_profile) { return gscms_get_input_channel_count(icc_profile->profile_handle); }
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,195
gsicc_init_device_profile_struct(gx_device * dev, char *profile_name, gsicc_profile_types_t profile_type) { int code; cmm_profile_t *curr_profile; cmm_dev_profile_t *profile_struct; /* See if the device has a profile structure. If it do...
Exec Code
0
gsicc_init_device_profile_struct(gx_device * dev, char *profile_name, gsicc_profile_types_t profile_type) { int code; cmm_profile_t *curr_profile; cmm_dev_profile_t *profile_struct; /* See if the device has a profile structure. If it do...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,196
gsicc_init_gs_colors(gs_gstate *pgs) { int code = 0; gs_color_space *cs_old; gs_color_space *cs_new; int k; if (pgs->in_cachedevice) return_error(gs_error_undefined); for (k = 0; k < 2; k++) { /* First do color space 0 */ cs_old = pgs->color[k].color_space...
Exec Code
0
gsicc_init_gs_colors(gs_gstate *pgs) { int code = 0; gs_color_space *cs_old; gs_color_space *cs_new; int k; if (pgs->in_cachedevice) return_error(gs_error_undefined); for (k = 0; k < 2; k++) { /* First do color space 0 */ cs_old = pgs->color[k].color_space...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,197
gsicc_init_profile_info(cmm_profile_t *profile) { int k; /* Get the profile handle */ profile->profile_handle = gsicc_get_profile_handle_buffer(profile->buffer, profile->buffer_size, profile->memory); if (profile->p...
Exec Code
0
gsicc_init_profile_info(cmm_profile_t *profile) { int k; /* Get the profile handle */ profile->profile_handle = gsicc_get_profile_handle_buffer(profile->buffer, profile->buffer_size, profile->memory); if (profile->p...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,198
gsicc_initialize_default_profile(cmm_profile_t *icc_profile) { gsicc_profile_t defaulttype = icc_profile->default_match; gsicc_colorbuffer_t default_space = gsUNDEFINED; int num_comps, num_comps_out; gs_memory_t *mem = icc_profile->memory; /* Get the profile handle if it is not already set */ i...
Exec Code
0
gsicc_initialize_default_profile(cmm_profile_t *icc_profile) { gsicc_profile_t defaulttype = icc_profile->default_match; gsicc_colorbuffer_t default_space = gsUNDEFINED; int num_comps, num_comps_out; gs_memory_t *mem = icc_profile->memory; /* Get the profile handle if it is not already set */ i...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null
11,199
gsicc_initialize_iccsmask(gsicc_manager_t *icc_manager) { gs_memory_t *stable_mem = icc_manager->memory->stable_memory; /* Allocations need to be done in stable memory. We want to maintain the smask_profiles object */ icc_manager->smask_profiles = gsicc_new_iccsmask(stable_mem); if (icc_manager...
Exec Code
0
gsicc_initialize_iccsmask(gsicc_manager_t *icc_manager) { gs_memory_t *stable_mem = icc_manager->memory->stable_memory; /* Allocations need to be done in stable memory. We want to maintain the smask_profiles object */ icc_manager->smask_profiles = gsicc_new_iccsmask(stable_mem); if (icc_manager...
@@ -1124,10 +1124,12 @@ gsicc_open_search(const char* pname, int namelen, gs_memory_t *mem_gc, } /* First just try it like it is */ - str = sfopen(pname, "r", mem_gc); - if (str != NULL) { - *strp = str; - return 0; + if (gs_check_file_permission(mem_gc, pname, namelen, "r") >= 0) { +...
CWE-20
null
null