idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
32,800 | static int getenv_int(const char *name)
{
char *value, *end;
long result;
value = getenv(name);
if(!value)
return 0;
result = strtol(value, &end, 10);
if(*end != '\0')
return 0;
return (int)result;
}
| DoS | 0 | static int getenv_int(const char *name)
{
char *value, *end;
long result;
value = getenv(name);
if(!value)
return 0;
result = strtol(value, &end, 10);
if(*end != '\0')
return 0;
return (int)result;
}
| @@ -37,6 +37,8 @@ struct config {
int sort_keys;
int strip;
int use_env;
+ int have_hashseed;
+ int hashseed;
} conf;
#define l_isspace(c) ((c) == ' ' || (c) == '\n' || (c) == '\r' || (c) == '\t')
@@ -108,6 +110,12 @@ static void read_conf(FILE *conffile)
conf.sort_keys = atoi(val)... | CWE-310 | null | null |
32,801 | int main(int argc, char *argv[])
{
int i;
char *test_path = NULL;
#ifdef HAVE_SETLOCALE
setlocale(LC_ALL, "");
#endif
if (argc < 2) {
goto usage;
}
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "--strip"))
conf.strip = 1;
else if (!strcmp(argv[i... | DoS | 0 | int main(int argc, char *argv[])
{
int i;
char *test_path = NULL;
#ifdef HAVE_SETLOCALE
setlocale(LC_ALL, "");
#endif
if (argc < 2) {
goto usage;
}
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "--strip"))
conf.strip = 1;
else if (!strcmp(argv[i... | @@ -37,6 +37,8 @@ struct config {
int sort_keys;
int strip;
int use_env;
+ int have_hashseed;
+ int hashseed;
} conf;
#define l_isspace(c) ((c) == ' ' || (c) == '\n' || (c) == '\r' || (c) == '\t')
@@ -108,6 +110,12 @@ static void read_conf(FILE *conffile)
conf.sort_keys = atoi(val)... | CWE-310 | null | null |
32,802 | static const char *strip(char *str)
{
size_t length;
char *result = str;
while (*result && l_isspace(*result))
result++;
length = strlen(result);
if (length == 0)
return result;
while (l_isspace(result[length - 1]))
result[--length] = '\0';
return result;
}
| DoS | 0 | static const char *strip(char *str)
{
size_t length;
char *result = str;
while (*result && l_isspace(*result))
result++;
length = strlen(result);
if (length == 0)
return result;
while (l_isspace(result[length - 1]))
result[--length] = '\0';
return result;
}
| @@ -37,6 +37,8 @@ struct config {
int sort_keys;
int strip;
int use_env;
+ int have_hashseed;
+ int hashseed;
} conf;
#define l_isspace(c) ((c) == ' ' || (c) == '\n' || (c) == '\r' || (c) == '\t')
@@ -108,6 +110,12 @@ static void read_conf(FILE *conffile)
conf.sort_keys = atoi(val)... | CWE-310 | null | null |
32,803 | const char *json_tokener_error_desc(enum json_tokener_error jerr)
{
int jerr_int = (int)jerr;
if (jerr_int < 0 || jerr_int >= (int)(sizeof(json_tokener_errors) / sizeof(json_tokener_errors[0])))
return "Unknown error, invalid json_tokener_error value passed to json_tokener_error_desc()";
return json_tokener_error... | DoS | 0 | const char *json_tokener_error_desc(enum json_tokener_error jerr)
{
int jerr_int = (int)jerr;
if (jerr_int < 0 || jerr_int >= (int)(sizeof(json_tokener_errors) / sizeof(json_tokener_errors[0])))
return "Unknown error, invalid json_tokener_error value passed to json_tokener_error_desc()";
return json_tokener_error... | @@ -81,6 +81,7 @@ static const char* json_tokener_errors[] = {
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
+ "buffer size overflow"
};
const char *json_tokener_error_desc(enum json_tokener_error jerr)
@@ -243,6 +244,16 @@ struct json_object* json_tokener_parse_ex(... | CWE-310 | null | null |
32,804 | void json_tokener_free(struct json_tokener *tok)
{
json_tokener_reset(tok);
if (tok->pb) printbuf_free(tok->pb);
if (tok->stack) free(tok->stack);
free(tok);
}
| DoS | 0 | void json_tokener_free(struct json_tokener *tok)
{
json_tokener_reset(tok);
if (tok->pb) printbuf_free(tok->pb);
if (tok->stack) free(tok->stack);
free(tok);
}
| @@ -81,6 +81,7 @@ static const char* json_tokener_errors[] = {
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
+ "buffer size overflow"
};
const char *json_tokener_error_desc(enum json_tokener_error jerr)
@@ -243,6 +244,16 @@ struct json_object* json_tokener_parse_ex(... | CWE-310 | null | null |
32,805 | enum json_tokener_error json_tokener_get_error(json_tokener *tok)
{
return tok->err;
}
| DoS | 0 | enum json_tokener_error json_tokener_get_error(json_tokener *tok)
{
return tok->err;
}
| @@ -81,6 +81,7 @@ static const char* json_tokener_errors[] = {
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
+ "buffer size overflow"
};
const char *json_tokener_error_desc(enum json_tokener_error jerr)
@@ -243,6 +244,16 @@ struct json_object* json_tokener_parse_ex(... | CWE-310 | null | null |
32,806 | struct json_tokener* json_tokener_new_ex(int depth)
{
struct json_tokener *tok;
tok = (struct json_tokener*)calloc(1, sizeof(struct json_tokener));
if (!tok) return NULL;
tok->stack = (struct json_tokener_srec *)calloc(depth, sizeof(struct json_tokener_srec));
if (!tok->stack) {
free(tok);
return NUL... | DoS | 0 | struct json_tokener* json_tokener_new_ex(int depth)
{
struct json_tokener *tok;
tok = (struct json_tokener*)calloc(1, sizeof(struct json_tokener));
if (!tok) return NULL;
tok->stack = (struct json_tokener_srec *)calloc(depth, sizeof(struct json_tokener_srec));
if (!tok->stack) {
free(tok);
return NUL... | @@ -81,6 +81,7 @@ static const char* json_tokener_errors[] = {
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
+ "buffer size overflow"
};
const char *json_tokener_error_desc(enum json_tokener_error jerr)
@@ -243,6 +244,16 @@ struct json_object* json_tokener_parse_ex(... | CWE-310 | null | null |
32,807 | struct json_object* json_tokener_parse(const char *str)
{
enum json_tokener_error jerr_ignored;
struct json_object* obj;
obj = json_tokener_parse_verbose(str, &jerr_ignored);
return obj;
}
| DoS | 0 | struct json_object* json_tokener_parse(const char *str)
{
enum json_tokener_error jerr_ignored;
struct json_object* obj;
obj = json_tokener_parse_verbose(str, &jerr_ignored);
return obj;
}
| @@ -81,6 +81,7 @@ static const char* json_tokener_errors[] = {
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
+ "buffer size overflow"
};
const char *json_tokener_error_desc(enum json_tokener_error jerr)
@@ -243,6 +244,16 @@ struct json_object* json_tokener_parse_ex(... | CWE-310 | null | null |
32,808 | struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *error)
{
struct json_tokener* tok;
struct json_object* obj;
tok = json_tokener_new();
if (!tok)
return NULL;
obj = json_tokener_parse_ex(tok, str, -1);
*error = tok->err;
if(tok->err != json_token... | DoS | 0 | struct json_object* json_tokener_parse_verbose(const char *str, enum json_tokener_error *error)
{
struct json_tokener* tok;
struct json_object* obj;
tok = json_tokener_new();
if (!tok)
return NULL;
obj = json_tokener_parse_ex(tok, str, -1);
*error = tok->err;
if(tok->err != json_token... | @@ -81,6 +81,7 @@ static const char* json_tokener_errors[] = {
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
+ "buffer size overflow"
};
const char *json_tokener_error_desc(enum json_tokener_error jerr)
@@ -243,6 +244,16 @@ struct json_object* json_tokener_parse_ex(... | CWE-310 | null | null |
32,809 | void json_tokener_reset(struct json_tokener *tok)
{
int i;
if (!tok)
return;
for(i = tok->depth; i >= 0; i--)
json_tokener_reset_level(tok, i);
tok->depth = 0;
tok->err = json_tokener_success;
}
| DoS | 0 | void json_tokener_reset(struct json_tokener *tok)
{
int i;
if (!tok)
return;
for(i = tok->depth; i >= 0; i--)
json_tokener_reset_level(tok, i);
tok->depth = 0;
tok->err = json_tokener_success;
}
| @@ -81,6 +81,7 @@ static const char* json_tokener_errors[] = {
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
+ "buffer size overflow"
};
const char *json_tokener_error_desc(enum json_tokener_error jerr)
@@ -243,6 +244,16 @@ struct json_object* json_tokener_parse_ex(... | CWE-310 | null | null |
32,810 | static void json_tokener_reset_level(struct json_tokener *tok, int depth)
{
tok->stack[depth].state = json_tokener_state_eatws;
tok->stack[depth].saved_state = json_tokener_state_start;
json_object_put(tok->stack[depth].current);
tok->stack[depth].current = NULL;
free(tok->stack[depth].obj_field_name);
tok-... | DoS | 0 | static void json_tokener_reset_level(struct json_tokener *tok, int depth)
{
tok->stack[depth].state = json_tokener_state_eatws;
tok->stack[depth].saved_state = json_tokener_state_start;
json_object_put(tok->stack[depth].current);
tok->stack[depth].current = NULL;
free(tok->stack[depth].obj_field_name);
tok-... | @@ -81,6 +81,7 @@ static const char* json_tokener_errors[] = {
"object value separator ',' expected",
"invalid string sequence",
"expected comment",
+ "buffer size overflow"
};
const char *json_tokener_error_desc(enum json_tokener_error jerr)
@@ -243,6 +244,16 @@ struct json_object* json_tokener_parse_ex(... | CWE-310 | null | null |
32,811 | int lh_char_equal(const void *k1, const void *k2)
{
return (strcmp((const char*)k1, (const char*)k2) == 0);
}
| DoS | 0 | int lh_char_equal(const void *k1, const void *k2)
{
return (strcmp((const char*)k1, (const char*)k2) == 0);
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,812 | struct lh_table* lh_kchar_table_new(int size, const char *name,
lh_entry_free_fn *free_fn)
{
return lh_table_new(size, name, free_fn, lh_char_hash, lh_char_equal);
}
| DoS | 0 | struct lh_table* lh_kchar_table_new(int size, const char *name,
lh_entry_free_fn *free_fn)
{
return lh_table_new(size, name, free_fn, lh_char_hash, lh_char_equal);
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,813 | struct lh_table* lh_kptr_table_new(int size, const char *name,
lh_entry_free_fn *free_fn)
{
return lh_table_new(size, name, free_fn, lh_ptr_hash, lh_ptr_equal);
}
| DoS | 0 | struct lh_table* lh_kptr_table_new(int size, const char *name,
lh_entry_free_fn *free_fn)
{
return lh_table_new(size, name, free_fn, lh_ptr_hash, lh_ptr_equal);
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,814 | int lh_ptr_equal(const void *k1, const void *k2)
{
return (k1 == k2);
}
| DoS | 0 | int lh_ptr_equal(const void *k1, const void *k2)
{
return (k1 == k2);
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,815 | unsigned long lh_ptr_hash(const void *k)
{
/* CAW: refactored to be 64bit nice */
return (unsigned long)((((ptrdiff_t)k * LH_PRIME) >> 4) & ULONG_MAX);
}
| DoS | 0 | unsigned long lh_ptr_hash(const void *k)
{
/* CAW: refactored to be 64bit nice */
return (unsigned long)((((ptrdiff_t)k * LH_PRIME) >> 4) & ULONG_MAX);
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,816 | int lh_table_delete(struct lh_table *t, const void *k)
{
struct lh_entry *e = lh_table_lookup_entry(t, k);
if(!e) return -1;
return lh_table_delete_entry(t, e);
}
| DoS | 0 | int lh_table_delete(struct lh_table *t, const void *k)
{
struct lh_entry *e = lh_table_lookup_entry(t, k);
if(!e) return -1;
return lh_table_delete_entry(t, e);
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,817 | void lh_table_free(struct lh_table *t)
{
struct lh_entry *c;
for(c = t->head; c != NULL; c = c->next) {
if(t->free_fn) {
t->free_fn(c);
}
}
free(t->table);
free(t);
}
| DoS | 0 | void lh_table_free(struct lh_table *t)
{
struct lh_entry *c;
for(c = t->head; c != NULL; c = c->next) {
if(t->free_fn) {
t->free_fn(c);
}
}
free(t->table);
free(t);
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,818 | int lh_table_insert(struct lh_table *t, void *k, const void *v)
{
unsigned long h, n;
t->inserts++;
if(t->count >= t->size * LH_LOAD_FACTOR) lh_table_resize(t, t->size * 2);
h = t->hash_fn(k);
n = h % t->size;
while( 1 ) {
if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break;
t->collisions++;
... | DoS | 0 | int lh_table_insert(struct lh_table *t, void *k, const void *v)
{
unsigned long h, n;
t->inserts++;
if(t->count >= t->size * LH_LOAD_FACTOR) lh_table_resize(t, t->size * 2);
h = t->hash_fn(k);
n = h % t->size;
while( 1 ) {
if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break;
t->collisions++;
... | @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,819 | int lh_table_length(struct lh_table *t)
{
return t->count;
}
| DoS | 0 | int lh_table_length(struct lh_table *t)
{
return t->count;
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,820 | const void* lh_table_lookup(struct lh_table *t, const void *k)
{
void *result;
lh_table_lookup_ex(t, k, &result);
return result;
}
| DoS | 0 | const void* lh_table_lookup(struct lh_table *t, const void *k)
{
void *result;
lh_table_lookup_ex(t, k, &result);
return result;
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,821 | struct lh_entry* lh_table_lookup_entry(struct lh_table *t, const void *k)
{
unsigned long h = t->hash_fn(k);
unsigned long n = h % t->size;
int count = 0;
t->lookups++;
while( count < t->size ) {
if(t->table[n].k == LH_EMPTY) return NULL;
if(t->table[n].k != LH_FREED &&
t->equal_fn(t->table[n].k, k)) ret... | DoS | 0 | struct lh_entry* lh_table_lookup_entry(struct lh_table *t, const void *k)
{
unsigned long h = t->hash_fn(k);
unsigned long n = h % t->size;
int count = 0;
t->lookups++;
while( count < t->size ) {
if(t->table[n].k == LH_EMPTY) return NULL;
if(t->table[n].k != LH_FREED &&
t->equal_fn(t->table[n].k, k)) ret... | @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,822 | json_bool lh_table_lookup_ex(struct lh_table* t, const void* k, void **v)
{
struct lh_entry *e = lh_table_lookup_entry(t, k);
if (e != NULL) {
if (v != NULL) *v = (void *)e->v;
return TRUE; /* key found */
}
if (v != NULL) *v = NULL;
return FALSE; /* key not found */
}
| DoS | 0 | json_bool lh_table_lookup_ex(struct lh_table* t, const void* k, void **v)
{
struct lh_entry *e = lh_table_lookup_entry(t, k);
if (e != NULL) {
if (v != NULL) *v = (void *)e->v;
return TRUE; /* key found */
}
if (v != NULL) *v = NULL;
return FALSE; /* key not found */
}
| @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,823 | struct lh_table* lh_table_new(int size, const char *name,
lh_entry_free_fn *free_fn,
lh_hash_fn *hash_fn,
lh_equal_fn *equal_fn)
{
int i;
struct lh_table *t;
t = (struct lh_table*)calloc(1, sizeof(struct lh_table));
if(!t) lh_abort("lh_table_new: calloc failed\n");
t->count = 0;
t->siz... | DoS | 0 | struct lh_table* lh_table_new(int size, const char *name,
lh_entry_free_fn *free_fn,
lh_hash_fn *hash_fn,
lh_equal_fn *equal_fn)
{
int i;
struct lh_table *t;
t = (struct lh_table*)calloc(1, sizeof(struct lh_table));
if(!t) lh_abort("lh_table_new: calloc failed\n");
t->count = 0;
t->siz... | @@ -17,6 +17,11 @@
#include <stddef.h>
#include <limits.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h> /* attempt to define endianness */
+#endif
+
+#include "random_seed.h"
#include "linkhash.h"
void lh_abort(const char *msg, ...)
@@ -39,14 +44,378 @@ int lh_ptr_equal(const void *k1, const void *k2)
retur... | CWE-310 | null | null |
32,824 | cmsBool AddMLUBlock(cmsMLU* mlu, cmsUInt32Number size, const wchar_t *Block,
cmsUInt16Number LanguageCode, cmsUInt16Number CountryCode)
{
cmsUInt32Number Offset;
cmsUInt8Number* Ptr;
if (mlu == NULL) return FALSE;
if (mlu ->UsedEntries >= mlu ->AllocatedEntries) {
if (!Gro... | DoS | 0 | cmsBool AddMLUBlock(cmsMLU* mlu, cmsUInt32Number size, const wchar_t *Block,
cmsUInt16Number LanguageCode, cmsUInt16Number CountryCode)
{
cmsUInt32Number Offset;
cmsUInt8Number* Ptr;
if (mlu == NULL) return FALSE;
if (mlu ->UsedEntries >= mlu ->AllocatedEntries) {
if (!Gro... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,825 | void* DupNamedColorList(cmsStage* mpe)
{
cmsNAMEDCOLORLIST* List = (cmsNAMEDCOLORLIST*) mpe ->Data;
return cmsDupNamedColorList(List);
}
| DoS | 0 | void* DupNamedColorList(cmsStage* mpe)
{
cmsNAMEDCOLORLIST* List = (cmsNAMEDCOLORLIST*) mpe ->Data;
return cmsDupNamedColorList(List);
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,826 | wchar_t* DupWcs(cmsContext ContextID, const wchar_t* ptr)
{
if (ptr == NULL) return NULL;
return (wchar_t*) _cmsDupMem(ContextID, ptr, (mywcslen(ptr) + 1) * sizeof(wchar_t));
}
| DoS | 0 | wchar_t* DupWcs(cmsContext ContextID, const wchar_t* ptr)
{
if (ptr == NULL) return NULL;
return (wchar_t*) _cmsDupMem(ContextID, ptr, (mywcslen(ptr) + 1) * sizeof(wchar_t));
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,827 | void EvalNamedColor(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
{
cmsNAMEDCOLORLIST* NamedColorList = (cmsNAMEDCOLORLIST*) mpe ->Data;
cmsUInt16Number index = (cmsUInt16Number) _cmsQuickSaturateWord(In[0] * 65535.0);
cmsUInt32Number j;
if (index >= NamedColorList-> nColors... | DoS | 0 | void EvalNamedColor(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
{
cmsNAMEDCOLORLIST* NamedColorList = (cmsNAMEDCOLORLIST*) mpe ->Data;
cmsUInt16Number index = (cmsUInt16Number) _cmsQuickSaturateWord(In[0] * 65535.0);
cmsUInt32Number j;
if (index >= NamedColorList-> nColors... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,828 | void EvalNamedColorPCS(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
{
cmsNAMEDCOLORLIST* NamedColorList = (cmsNAMEDCOLORLIST*) mpe ->Data;
cmsUInt16Number index = (cmsUInt16Number) _cmsQuickSaturateWord(In[0] * 65535.0);
if (index >= NamedColorList-> nColors) {
cmsSigna... | DoS | 0 | void EvalNamedColorPCS(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
{
cmsNAMEDCOLORLIST* NamedColorList = (cmsNAMEDCOLORLIST*) mpe ->Data;
cmsUInt16Number index = (cmsUInt16Number) _cmsQuickSaturateWord(In[0] * 65535.0);
if (index >= NamedColorList-> nColors) {
cmsSigna... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,829 | void FreeNamedColorList(cmsStage* mpe)
{
cmsNAMEDCOLORLIST* List = (cmsNAMEDCOLORLIST*) mpe ->Data;
cmsFreeNamedColorList(List);
}
| DoS | 0 | void FreeNamedColorList(cmsStage* mpe)
{
cmsNAMEDCOLORLIST* List = (cmsNAMEDCOLORLIST*) mpe ->Data;
cmsFreeNamedColorList(List);
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,830 | cmsBool GrowMLUtable(cmsMLU* mlu)
{
int AllocatedEntries;
_cmsMLUentry *NewPtr;
if (mlu == NULL) return FALSE;
AllocatedEntries = mlu ->AllocatedEntries * 2;
if (AllocatedEntries / 2 != mlu ->AllocatedEntries) return FALSE;
NewPtr = (_cmsMLUentry*)_cmsRealloc(mlu ->ContextID, mlu ->Entries, ... | DoS | 0 | cmsBool GrowMLUtable(cmsMLU* mlu)
{
int AllocatedEntries;
_cmsMLUentry *NewPtr;
if (mlu == NULL) return FALSE;
AllocatedEntries = mlu ->AllocatedEntries * 2;
if (AllocatedEntries / 2 != mlu ->AllocatedEntries) return FALSE;
NewPtr = (_cmsMLUentry*)_cmsRealloc(mlu ->ContextID, mlu ->Entries, ... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,831 | cmsBool GrowNamedColorList(cmsNAMEDCOLORLIST* v)
{
cmsUInt32Number size;
_cmsNAMEDCOLOR * NewPtr;
if (v == NULL) return FALSE;
if (v ->Allocated == 0)
size = 64; // Initial guess
else
size = v ->Allocated * 2;
if (size > 1024*100) return FALSE;
NewPtr = (_cmsNAMEDCOLOR... | DoS | 0 | cmsBool GrowNamedColorList(cmsNAMEDCOLORLIST* v)
{
cmsUInt32Number size;
_cmsNAMEDCOLOR * NewPtr;
if (v == NULL) return FALSE;
if (v ->Allocated == 0)
size = 64; // Initial guess
else
size = v ->Allocated * 2;
if (size > 1024*100) return FALSE;
NewPtr = (_cmsNAMEDCOLOR... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,832 | const wchar_t* _cmsMLUgetWide(const cmsMLU* mlu,
cmsUInt32Number *len,
cmsUInt16Number LanguageCode, cmsUInt16Number CountryCode,
cmsUInt16Number* UsedLanguageCode, cmsUInt16Number* UsedCountryCode)
{
int i;
int Best = -1;... | DoS | 0 | const wchar_t* _cmsMLUgetWide(const cmsMLU* mlu,
cmsUInt32Number *len,
cmsUInt16Number LanguageCode, cmsUInt16Number CountryCode,
cmsUInt16Number* UsedLanguageCode, cmsUInt16Number* UsedCountryCode)
{
int i;
int Best = -1;... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,833 | cmsBool CMSEXPORT cmsDictAddEntry(cmsHANDLE hDict, const wchar_t* Name, const wchar_t* Value, const cmsMLU *DisplayName, const cmsMLU *DisplayValue)
{
_cmsDICT* dict = (_cmsDICT*) hDict;
cmsDICTentry *entry;
_cmsAssert(dict != NULL);
_cmsAssert(Name != NULL);
entry = (cmsDICTentry*) _cmsMallocZero... | DoS | 0 | cmsBool CMSEXPORT cmsDictAddEntry(cmsHANDLE hDict, const wchar_t* Name, const wchar_t* Value, const cmsMLU *DisplayName, const cmsMLU *DisplayValue)
{
_cmsDICT* dict = (_cmsDICT*) hDict;
cmsDICTentry *entry;
_cmsAssert(dict != NULL);
_cmsAssert(Name != NULL);
entry = (cmsDICTentry*) _cmsMallocZero... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,834 | cmsHANDLE CMSEXPORT cmsDictAlloc(cmsContext ContextID)
{
_cmsDICT* dict = (_cmsDICT*) _cmsMallocZero(ContextID, sizeof(_cmsDICT));
if (dict == NULL) return NULL;
dict ->ContextID = ContextID;
return (cmsHANDLE) dict;
}
| DoS | 0 | cmsHANDLE CMSEXPORT cmsDictAlloc(cmsContext ContextID)
{
_cmsDICT* dict = (_cmsDICT*) _cmsMallocZero(ContextID, sizeof(_cmsDICT));
if (dict == NULL) return NULL;
dict ->ContextID = ContextID;
return (cmsHANDLE) dict;
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,835 | cmsHANDLE CMSEXPORT cmsDictDup(cmsHANDLE hDict)
{
_cmsDICT* old_dict = (_cmsDICT*) hDict;
cmsHANDLE hNew;
cmsDICTentry *entry;
_cmsAssert(old_dict != NULL);
hNew = cmsDictAlloc(old_dict ->ContextID);
if (hNew == NULL) return NULL;
entry = old_dict ->head;
while (entry != NULL) {
... | DoS | 0 | cmsHANDLE CMSEXPORT cmsDictDup(cmsHANDLE hDict)
{
_cmsDICT* old_dict = (_cmsDICT*) hDict;
cmsHANDLE hNew;
cmsDICTentry *entry;
_cmsAssert(old_dict != NULL);
hNew = cmsDictAlloc(old_dict ->ContextID);
if (hNew == NULL) return NULL;
entry = old_dict ->head;
while (entry != NULL) {
... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,836 | const cmsDICTentry* CMSEXPORT cmsDictGetEntryList(cmsHANDLE hDict)
{
_cmsDICT* dict = (_cmsDICT*) hDict;
if (dict == NULL) return NULL;
return dict ->head;
}
| DoS | 0 | const cmsDICTentry* CMSEXPORT cmsDictGetEntryList(cmsHANDLE hDict)
{
_cmsDICT* dict = (_cmsDICT*) hDict;
if (dict == NULL) return NULL;
return dict ->head;
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,837 | const cmsDICTentry* CMSEXPORT cmsDictNextEntry(const cmsDICTentry* e)
{
if (e == NULL) return NULL;
return e ->Next;
}
| DoS | 0 | const cmsDICTentry* CMSEXPORT cmsDictNextEntry(const cmsDICTentry* e)
{
if (e == NULL) return NULL;
return e ->Next;
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,838 | cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(const cmsNAMEDCOLORLIST* v)
{
cmsNAMEDCOLORLIST* NewNC;
if (v == NULL) return NULL;
NewNC= cmsAllocNamedColorList(v ->ContextID, v -> nColors, v ->ColorantCount, v ->Prefix, v ->Suffix);
if (NewNC == NULL) return NULL;
while (NewNC ->Allocated < v... | DoS | 0 | cmsNAMEDCOLORLIST* CMSEXPORT cmsDupNamedColorList(const cmsNAMEDCOLORLIST* v)
{
cmsNAMEDCOLORLIST* NewNC;
if (v == NULL) return NULL;
NewNC= cmsAllocNamedColorList(v ->ContextID, v -> nColors, v ->ColorantCount, v ->Prefix, v ->Suffix);
if (NewNC == NULL) return NULL;
while (NewNC ->Allocated < v... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,839 | cmsSEQ* CMSEXPORT cmsDupProfileSequenceDescription(const cmsSEQ* pseq)
{
cmsSEQ *NewSeq;
cmsUInt32Number i;
if (pseq == NULL)
return NULL;
NewSeq = (cmsSEQ*) _cmsMalloc(pseq -> ContextID, sizeof(cmsSEQ));
if (NewSeq == NULL) return NULL;
NewSeq -> seq = (cmsPSEQDESC*) _cmsCalloc... | DoS | 0 | cmsSEQ* CMSEXPORT cmsDupProfileSequenceDescription(const cmsSEQ* pseq)
{
cmsSEQ *NewSeq;
cmsUInt32Number i;
if (pseq == NULL)
return NULL;
NewSeq = (cmsSEQ*) _cmsMalloc(pseq -> ContextID, sizeof(cmsSEQ));
if (NewSeq == NULL) return NULL;
NewSeq -> seq = (cmsPSEQDESC*) _cmsCalloc... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,840 | void CMSEXPORT cmsFreeNamedColorList(cmsNAMEDCOLORLIST* v)
{
if (v == NULL) return;
if (v ->List) _cmsFree(v ->ContextID, v ->List);
_cmsFree(v ->ContextID, v);
}
| DoS | 0 | void CMSEXPORT cmsFreeNamedColorList(cmsNAMEDCOLORLIST* v)
{
if (v == NULL) return;
if (v ->List) _cmsFree(v ->ContextID, v ->List);
_cmsFree(v ->ContextID, v);
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,841 | void CMSEXPORT cmsFreeProfileSequenceDescription(cmsSEQ* pseq)
{
cmsUInt32Number i;
for (i=0; i < pseq ->n; i++) {
if (pseq ->seq[i].Manufacturer != NULL) cmsMLUfree(pseq ->seq[i].Manufacturer);
if (pseq ->seq[i].Model != NULL) cmsMLUfree(pseq ->seq[i].Model);
if (pseq ->seq[i].Descript... | DoS | 0 | void CMSEXPORT cmsFreeProfileSequenceDescription(cmsSEQ* pseq)
{
cmsUInt32Number i;
for (i=0; i < pseq ->n; i++) {
if (pseq ->seq[i].Manufacturer != NULL) cmsMLUfree(pseq ->seq[i].Manufacturer);
if (pseq ->seq[i].Model != NULL) cmsMLUfree(pseq ->seq[i].Model);
if (pseq ->seq[i].Descript... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,842 | cmsMLU* CMSEXPORT cmsMLUalloc(cmsContext ContextID, cmsUInt32Number nItems)
{
cmsMLU* mlu;
if (nItems <= 0) nItems = 2;
mlu = (cmsMLU*) _cmsMallocZero(ContextID, sizeof(cmsMLU));
if (mlu == NULL) return NULL;
mlu ->ContextID = ContextID;
mlu ->Entries = (_cmsMLUentry*) _cmsCalloc(ContextID, ... | DoS | 0 | cmsMLU* CMSEXPORT cmsMLUalloc(cmsContext ContextID, cmsUInt32Number nItems)
{
cmsMLU* mlu;
if (nItems <= 0) nItems = 2;
mlu = (cmsMLU*) _cmsMallocZero(ContextID, sizeof(cmsMLU));
if (mlu == NULL) return NULL;
mlu ->ContextID = ContextID;
mlu ->Entries = (_cmsMLUentry*) _cmsCalloc(ContextID, ... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,843 | cmsMLU* CMSEXPORT cmsMLUdup(const cmsMLU* mlu)
{
cmsMLU* NewMlu = NULL;
if (mlu == NULL) return NULL;
NewMlu = cmsMLUalloc(mlu ->ContextID, mlu ->UsedEntries);
if (NewMlu == NULL) return NULL;
if (NewMlu ->AllocatedEntries < mlu ->UsedEntries)
goto Error;
if (NewMlu ->Entries == NULL... | DoS | 0 | cmsMLU* CMSEXPORT cmsMLUdup(const cmsMLU* mlu)
{
cmsMLU* NewMlu = NULL;
if (mlu == NULL) return NULL;
NewMlu = cmsMLUalloc(mlu ->ContextID, mlu ->UsedEntries);
if (NewMlu == NULL) return NULL;
if (NewMlu ->AllocatedEntries < mlu ->UsedEntries)
goto Error;
if (NewMlu ->Entries == NULL... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,844 | void CMSEXPORT cmsMLUfree(cmsMLU* mlu)
{
if (mlu) {
if (mlu -> Entries) _cmsFree(mlu ->ContextID, mlu->Entries);
if (mlu -> MemPool) _cmsFree(mlu ->ContextID, mlu->MemPool);
_cmsFree(mlu ->ContextID, mlu);
}
}
| DoS | 0 | void CMSEXPORT cmsMLUfree(cmsMLU* mlu)
{
if (mlu) {
if (mlu -> Entries) _cmsFree(mlu ->ContextID, mlu->Entries);
if (mlu -> MemPool) _cmsFree(mlu ->ContextID, mlu->MemPool);
_cmsFree(mlu ->ContextID, mlu);
}
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,845 | cmsUInt32Number CMSEXPORT cmsMLUgetASCII(const cmsMLU* mlu,
const char LanguageCode[3], const char CountryCode[3],
char* Buffer, cmsUInt32Number BufferSize)
{
const wchar_t *Wide;
cmsUInt32Number StrLen = 0;
cmsUInt32Number ASCII... | DoS | 0 | cmsUInt32Number CMSEXPORT cmsMLUgetASCII(const cmsMLU* mlu,
const char LanguageCode[3], const char CountryCode[3],
char* Buffer, cmsUInt32Number BufferSize)
{
const wchar_t *Wide;
cmsUInt32Number StrLen = 0;
cmsUInt32Number ASCII... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,846 | CMSAPI cmsBool CMSEXPORT cmsMLUgetTranslation(const cmsMLU* mlu,
const char LanguageCode[3], const char CountryCode[3],
char ObtainedLanguage[3], char ObtainedCountry[3])
{
const wchar_t *Wide;
cmsUInt16Number Lang = _... | DoS | 0 | CMSAPI cmsBool CMSEXPORT cmsMLUgetTranslation(const cmsMLU* mlu,
const char LanguageCode[3], const char CountryCode[3],
char ObtainedLanguage[3], char ObtainedCountry[3])
{
const wchar_t *Wide;
cmsUInt16Number Lang = _... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,847 | cmsUInt32Number CMSEXPORT cmsMLUgetWide(const cmsMLU* mlu,
const char LanguageCode[3], const char CountryCode[3],
wchar_t* Buffer, cmsUInt32Number BufferSize)
{
const wchar_t *Wide;
cmsUInt32Number StrLen = 0;
cmsUInt16Number Lang... | DoS | 0 | cmsUInt32Number CMSEXPORT cmsMLUgetWide(const cmsMLU* mlu,
const char LanguageCode[3], const char CountryCode[3],
wchar_t* Buffer, cmsUInt32Number BufferSize)
{
const wchar_t *Wide;
cmsUInt32Number StrLen = 0;
cmsUInt16Number Lang... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,848 | cmsBool CMSEXPORT cmsMLUsetASCII(cmsMLU* mlu, const char LanguageCode[3], const char CountryCode[3], const char* ASCIIString)
{
cmsUInt32Number i, len = (cmsUInt32Number) strlen(ASCIIString)+1;
wchar_t* WStr;
cmsBool rc;
cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
... | DoS | 0 | cmsBool CMSEXPORT cmsMLUsetASCII(cmsMLU* mlu, const char LanguageCode[3], const char CountryCode[3], const char* ASCIIString)
{
cmsUInt32Number i, len = (cmsUInt32Number) strlen(ASCIIString)+1;
wchar_t* WStr;
cmsBool rc;
cmsUInt16Number Lang = _cmsAdjustEndianess16(*(cmsUInt16Number*) LanguageCode);
... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,849 | cmsBool CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu,
cmsUInt32Number idx,
char LanguageCode[3],
char CountryCode[3])
{
_cmsMLUentry *entry;
if (mlu == NULL) return FALSE;
i... | DoS | 0 | cmsBool CMSEXPORT cmsMLUtranslationsCodes(const cmsMLU* mlu,
cmsUInt32Number idx,
char LanguageCode[3],
char CountryCode[3])
{
_cmsMLUentry *entry;
if (mlu == NULL) return FALSE;
i... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,850 | cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu)
{
if (mlu == NULL) return 0;
return mlu->UsedEntries;
}
| DoS | 0 | cmsUInt32Number CMSEXPORT cmsMLUtranslationsCount(const cmsMLU* mlu)
{
if (mlu == NULL) return 0;
return mlu->UsedEntries;
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,851 | cmsUInt32Number CMSEXPORT cmsNamedColorCount(const cmsNAMEDCOLORLIST* NamedColorList)
{
if (NamedColorList == NULL) return 0;
return NamedColorList ->nColors;
}
| DoS | 0 | cmsUInt32Number CMSEXPORT cmsNamedColorCount(const cmsNAMEDCOLORLIST* NamedColorList)
{
if (NamedColorList == NULL) return 0;
return NamedColorList ->nColors;
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,852 | cmsInt32Number CMSEXPORT cmsNamedColorIndex(const cmsNAMEDCOLORLIST* NamedColorList, const char* Name)
{
int i, n;
if (NamedColorList == NULL) return -1;
n = cmsNamedColorCount(NamedColorList);
for (i=0; i < n; i++) {
if (cmsstrcasecmp(Name, NamedColorList->List[i].Name) == 0)
retu... | DoS | 0 | cmsInt32Number CMSEXPORT cmsNamedColorIndex(const cmsNAMEDCOLORLIST* NamedColorList, const char* Name)
{
int i, n;
if (NamedColorList == NULL) return -1;
n = cmsNamedColorCount(NamedColorList);
for (i=0; i < n; i++) {
if (cmsstrcasecmp(Name, NamedColorList->List[i].Name) == 0)
retu... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,853 | cmsBool CMSEXPORT cmsNamedColorInfo(const cmsNAMEDCOLORLIST* NamedColorList, cmsUInt32Number nColor,
char* Name,
char* Prefix,
char* Suffix,
cmsUInt16Number* PCS,
... | DoS | 0 | cmsBool CMSEXPORT cmsNamedColorInfo(const cmsNAMEDCOLORLIST* NamedColorList, cmsUInt32Number nColor,
char* Name,
char* Prefix,
char* Suffix,
cmsUInt16Number* PCS,
... | @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,854 | cmsUInt32Number mywcslen(const wchar_t *s)
{
const wchar_t *p;
p = s;
while (*p)
p++;
return (cmsUInt32Number)(p - s);
}
| DoS | 0 | cmsUInt32Number mywcslen(const wchar_t *s)
{
const wchar_t *p;
p = s;
while (*p)
p++;
return (cmsUInt32Number)(p - s);
}
| @@ -517,8 +517,8 @@ cmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUIn
while (v -> Allocated < n)
GrowNamedColorList(v);
- strncpy(v ->Prefix, Prefix, sizeof(v ->Prefix));
- strncpy(v ->Suffix, Suffix, sizeof(v ->Suffix));
+ strncpy(v ->Prefix, Prefix, sizeof(v ->P... | null | null | null |
32,855 | cmsBool AllCurvesAreLinear(cmsStage* mpe)
{
cmsToneCurve** Curves;
cmsUInt32Number i, n;
Curves = _cmsStageGetPtrToCurveSet(mpe);
if (Curves == NULL) return FALSE;
n = cmsStageOutputChannels(mpe);
for (i=0; i < n; i++) {
if (!cmsIsToneCurveLinear(Curves[i])) return FALSE;
}
r... | DoS | 0 | cmsBool AllCurvesAreLinear(cmsStage* mpe)
{
cmsToneCurve** Curves;
cmsUInt32Number i, n;
Curves = _cmsStageGetPtrToCurveSet(mpe);
if (Curves == NULL) return FALSE;
n = cmsStageOutputChannels(mpe);
for (i=0; i < n; i++) {
if (!cmsIsToneCurveLinear(Curves[i])) return FALSE;
}
r... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,856 | void* CurvesDup(cmsContext ContextID, const void* ptr)
{
Curves16Data* Data = _cmsDupMem(ContextID, ptr, sizeof(Curves16Data));
int i;
if (Data == NULL) return NULL;
Data ->Curves = _cmsDupMem(ContextID, Data ->Curves, Data ->nCurves * sizeof(cmsUInt16Number*));
for (i=0; i < Data -> nCurves; i++... | DoS | 0 | void* CurvesDup(cmsContext ContextID, const void* ptr)
{
Curves16Data* Data = _cmsDupMem(ContextID, ptr, sizeof(Curves16Data));
int i;
if (Data == NULL) return NULL;
Data ->Curves = _cmsDupMem(ContextID, Data ->Curves, Data ->nCurves * sizeof(cmsUInt16Number*));
for (i=0; i < Data -> nCurves; i++... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,857 | void CurvesFree(cmsContext ContextID, void* ptr)
{
Curves16Data* Data = (Curves16Data*) ptr;
int i;
for (i=0; i < Data -> nCurves; i++) {
_cmsFree(ContextID, Data ->Curves[i]);
}
_cmsFree(ContextID, Data ->Curves);
_cmsFree(ContextID, ptr);
}
| DoS | 0 | void CurvesFree(cmsContext ContextID, void* ptr)
{
Curves16Data* Data = (Curves16Data*) ptr;
int i;
for (i=0; i < Data -> nCurves; i++) {
_cmsFree(ContextID, Data ->Curves[i]);
}
_cmsFree(ContextID, Data ->Curves);
_cmsFree(ContextID, ptr);
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,858 | void* DupMatShaper(cmsContext ContextID, const void* Data)
{
return _cmsDupMem(ContextID, Data, sizeof(MatShaper8Data));
}
| DoS | 0 | void* DupMatShaper(cmsContext ContextID, const void* Data)
{
return _cmsDupMem(ContextID, Data, sizeof(MatShaper8Data));
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,859 | void Eval16nop1D(register const cmsUInt16Number Input[],
register cmsUInt16Number Output[],
register const struct _cms_interp_struc* p)
{
Output[0] = Input[0];
cmsUNUSED_PARAMETER(p);
}
| DoS | 0 | void Eval16nop1D(register const cmsUInt16Number Input[],
register cmsUInt16Number Output[],
register const struct _cms_interp_struc* p)
{
Output[0] = Input[0];
cmsUNUSED_PARAMETER(p);
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,860 | void FastEvaluateCurves16(register const cmsUInt16Number In[],
register cmsUInt16Number Out[],
register const void* D)
{
Curves16Data* Data = (Curves16Data*) D;
int i;
for (i=0; i < Data ->nCurves; i++) {
Out[i] = Data -> Curves[i][In[i]];
}
... | DoS | 0 | void FastEvaluateCurves16(register const cmsUInt16Number In[],
register cmsUInt16Number Out[],
register const void* D)
{
Curves16Data* Data = (Curves16Data*) D;
int i;
for (i=0; i < Data ->nCurves; i++) {
Out[i] = Data -> Curves[i][In[i]];
}
... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,861 | void FastEvaluateCurves8(register const cmsUInt16Number In[],
register cmsUInt16Number Out[],
register const void* D)
{
Curves16Data* Data = (Curves16Data*) D;
cmsUInt8Number x;
int i;
for (i=0; i < Data ->nCurves; i++) {
x = (In[i] >> 8);
... | DoS | 0 | void FastEvaluateCurves8(register const cmsUInt16Number In[],
register cmsUInt16Number Out[],
register const void* D)
{
Curves16Data* Data = (Curves16Data*) D;
cmsUInt8Number x;
int i;
for (i=0; i < Data ->nCurves; i++) {
x = (In[i] >> 8);
... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,862 | void FastIdentity16(register const cmsUInt16Number In[],
register cmsUInt16Number Out[],
register const void* D)
{
cmsPipeline* Lut = (cmsPipeline*) D;
cmsUInt32Number i;
for (i=0; i < Lut ->InputChannels; i++) {
Out[i] = In[i];
}
}
| DoS | 0 | void FastIdentity16(register const cmsUInt16Number In[],
register cmsUInt16Number Out[],
register const void* D)
{
cmsPipeline* Lut = (cmsPipeline*) D;
cmsUInt32Number i;
for (i=0; i < Lut ->InputChannels; i++) {
Out[i] = In[i];
}
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,863 | void FillFirstShaper(cmsS1Fixed14Number* Table, cmsToneCurve* Curve)
{
int i;
cmsFloat32Number R, y;
for (i=0; i < 256; i++) {
R = (cmsFloat32Number) (i / 255.0);
y = cmsEvalToneCurveFloat(Curve, R);
Table[i] = DOUBLE_TO_1FIXED14(y);
}
}
| DoS | 0 | void FillFirstShaper(cmsS1Fixed14Number* Table, cmsToneCurve* Curve)
{
int i;
cmsFloat32Number R, y;
for (i=0; i < 256; i++) {
R = (cmsFloat32Number) (i / 255.0);
y = cmsEvalToneCurveFloat(Curve, R);
Table[i] = DOUBLE_TO_1FIXED14(y);
}
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,864 | void FillSecondShaper(cmsUInt16Number* Table, cmsToneCurve* Curve, cmsBool Is8BitsOutput)
{
int i;
cmsFloat32Number R, Val;
for (i=0; i < 16385; i++) {
R = (cmsFloat32Number) (i / 16384.0);
Val = cmsEvalToneCurveFloat(Curve, R); // Val comes 0..1.0
if (Is8BitsOutput) {
... | DoS | 0 | void FillSecondShaper(cmsUInt16Number* Table, cmsToneCurve* Curve, cmsBool Is8BitsOutput)
{
int i;
cmsFloat32Number R, Val;
for (i=0; i < 16385; i++) {
R = (cmsFloat32Number) (i / 16384.0);
Val = cmsEvalToneCurveFloat(Curve, R); // Val comes 0..1.0
if (Is8BitsOutput) {
... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,865 | cmsBool FixWhiteMisalignment(cmsPipeline* Lut, cmsColorSpaceSignature EntryColorSpace, cmsColorSpaceSignature ExitColorSpace)
{
cmsUInt16Number *WhitePointIn, *WhitePointOut;
cmsUInt16Number WhiteIn[cmsMAXCHANNELS], WhiteOut[cmsMAXCHANNELS], ObtainedOut[cmsMAXCHANNELS];
cmsUInt32Number i, nOuts, nIns;
... | DoS | 0 | cmsBool FixWhiteMisalignment(cmsPipeline* Lut, cmsColorSpaceSignature EntryColorSpace, cmsColorSpaceSignature ExitColorSpace)
{
cmsUInt16Number *WhitePointIn, *WhitePointOut;
cmsUInt16Number WhiteIn[cmsMAXCHANNELS], WhiteOut[cmsMAXCHANNELS], ObtainedOut[cmsMAXCHANNELS];
cmsUInt32Number i, nOuts, nIns;
... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,866 | void FreeMatShaper(cmsContext ContextID, void* Data)
{
if (Data != NULL) _cmsFree(ContextID, Data);
}
| DoS | 0 | void FreeMatShaper(cmsContext ContextID, void* Data)
{
if (Data != NULL) _cmsFree(ContextID, Data);
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,867 | cmsBool IsDegenerated(const cmsToneCurve* g)
{
int i, Zeros = 0, Poles = 0;
int nEntries = g ->nEntries;
for (i=0; i < nEntries; i++) {
if (g ->Table16[i] == 0x0000) Zeros++;
if (g ->Table16[i] == 0xffff) Poles++;
}
if (Zeros == 1 && Poles == 1) return FALSE; // For linear tables... | DoS | 0 | cmsBool IsDegenerated(const cmsToneCurve* g)
{
int i, Zeros = 0, Poles = 0;
int nEntries = g ->nEntries;
for (i=0; i < nEntries; i++) {
if (g ->Table16[i] == 0x0000) Zeros++;
if (g ->Table16[i] == 0xffff) Poles++;
}
if (Zeros == 1 && Poles == 1) return FALSE; // For linear tables... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,868 | void MatShaperEval16(register const cmsUInt16Number In[],
register cmsUInt16Number Out[],
register const void* D)
{
MatShaper8Data* p = (MatShaper8Data*) D;
cmsS1Fixed14Number l1, l2, l3, r, g, b;
cmsUInt32Number ri, gi, bi;
ri = In[0] & 0xFF;
gi = In[1] & ... | DoS | 0 | void MatShaperEval16(register const cmsUInt16Number In[],
register cmsUInt16Number Out[],
register const void* D)
{
MatShaper8Data* p = (MatShaper8Data*) D;
cmsS1Fixed14Number l1, l2, l3, r, g, b;
cmsUInt32Number ri, gi, bi;
ri = In[0] & 0xFF;
gi = In[1] & ... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,869 | cmsBool OptimizeByComputingLinearization(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsPipeline* OriginalLut;
int nGridPoints;
cmsToneCurve *Trans[cmsMAXCHANNELS], *TransReverse[cmsMAXCHANNELS];
cmsUInt32Number t, i... | DoS | 0 | cmsBool OptimizeByComputingLinearization(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsPipeline* OriginalLut;
int nGridPoints;
cmsToneCurve *Trans[cmsMAXCHANNELS], *TransReverse[cmsMAXCHANNELS];
cmsUInt32Number t, i... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,870 | cmsBool OptimizeByJoiningCurves(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsToneCurve** GammaTables = NULL;
cmsFloat32Number InFloat[cmsMAXCHANNELS], OutFloat[cmsMAXCHANNELS];
cmsUInt32Number i, j;
cmsPipeline* Sr... | DoS | 0 | cmsBool OptimizeByJoiningCurves(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsToneCurve** GammaTables = NULL;
cmsFloat32Number InFloat[cmsMAXCHANNELS], OutFloat[cmsMAXCHANNELS];
cmsUInt32Number i, j;
cmsPipeline* Sr... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,871 | cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsPipeline* Src = NULL;
cmsPipeline* Dest = NULL;
cmsStage* mpe;
cmsStage* CLUT;
cmsStage *KeepPreLin = NULL, *KeepPostLin = NULL;
int... | DoS | 0 | cmsBool OptimizeByResampling(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsPipeline* Src = NULL;
cmsPipeline* Dest = NULL;
cmsStage* mpe;
cmsStage* CLUT;
cmsStage *KeepPreLin = NULL, *KeepPostLin = NULL;
int... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,872 | cmsBool OptimizeMatrixShaper(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsStage* Curve1, *Curve2;
cmsStage* Matrix1, *Matrix2;
_cmsStageMatrixData* Data1;
_cmsStageMatrixData* Data2;
cmsMAT3 res;
cmsBool Id... | DoS | 0 | cmsBool OptimizeMatrixShaper(cmsPipeline** Lut, cmsUInt32Number Intent, cmsUInt32Number* InputFormat, cmsUInt32Number* OutputFormat, cmsUInt32Number* dwFlags)
{
cmsStage* Curve1, *Curve2;
cmsStage* Matrix1, *Matrix2;
_cmsStageMatrixData* Data1;
_cmsStageMatrixData* Data2;
cmsMAT3 res;
cmsBool Id... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,873 | cmsBool PreOptimize(cmsPipeline* Lut)
{
cmsBool AnyOpt = FALSE, Opt;
do {
Opt = FALSE;
Opt |= _Remove1Op(Lut, cmsSigIdentityElemType);
Opt |= _Remove2Op(Lut, cmsSigXYZ2LabElemType, cmsSigLab2XYZElemType);
Opt |= _Remove2Op(Lut, cmsSigLab2XYZElemType, cmsSigXYZ2LabElemType);
... | DoS | 0 | cmsBool PreOptimize(cmsPipeline* Lut)
{
cmsBool AnyOpt = FALSE, Opt;
do {
Opt = FALSE;
Opt |= _Remove1Op(Lut, cmsSigIdentityElemType);
Opt |= _Remove2Op(Lut, cmsSigXYZ2LabElemType, cmsSigLab2XYZElemType);
Opt |= _Remove2Op(Lut, cmsSigLab2XYZElemType, cmsSigXYZ2LabElemType);
... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,874 | void* Prelin16dup(cmsContext ContextID, const void* ptr)
{
Prelin16Data* p16 = (Prelin16Data*) ptr;
Prelin16Data* Duped = _cmsDupMem(ContextID, p16, sizeof(Prelin16Data));
if (Duped == NULL) return NULL;
Duped ->EvalCurveOut16 = _cmsDupMem(ContextID, p16 ->EvalCurveOut16, p16 ->nOutputs * sizeof(_cm... | DoS | 0 | void* Prelin16dup(cmsContext ContextID, const void* ptr)
{
Prelin16Data* p16 = (Prelin16Data*) ptr;
Prelin16Data* Duped = _cmsDupMem(ContextID, p16, sizeof(Prelin16Data));
if (Duped == NULL) return NULL;
Duped ->EvalCurveOut16 = _cmsDupMem(ContextID, p16 ->EvalCurveOut16, p16 ->nOutputs * sizeof(_cm... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,875 | void* Prelin8dup(cmsContext ContextID, const void* ptr)
{
return _cmsDupMem(ContextID, ptr, sizeof(Prelin8Data));
}
| DoS | 0 | void* Prelin8dup(cmsContext ContextID, const void* ptr)
{
return _cmsDupMem(ContextID, ptr, sizeof(Prelin8Data));
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,876 | void Prelin8free(cmsContext ContextID, void* ptr)
{
_cmsFree(ContextID, ptr);
}
| DoS | 0 | void Prelin8free(cmsContext ContextID, void* ptr)
{
_cmsFree(ContextID, ptr);
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,877 | void PrelinEval16(register const cmsUInt16Number Input[],
register cmsUInt16Number Output[],
register const void* D)
{
Prelin16Data* p16 = (Prelin16Data*) D;
cmsUInt16Number StageABC[MAX_INPUT_DIMENSIONS];
cmsUInt16Number StageDEF[cmsMAXCHANNELS];
int i;
for (i... | DoS | 0 | void PrelinEval16(register const cmsUInt16Number Input[],
register cmsUInt16Number Output[],
register const void* D)
{
Prelin16Data* p16 = (Prelin16Data*) D;
cmsUInt16Number StageABC[MAX_INPUT_DIMENSIONS];
cmsUInt16Number StageDEF[cmsMAXCHANNELS];
int i;
for (i... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,878 | void PrelinEval8(register const cmsUInt16Number Input[],
register cmsUInt16Number Output[],
register const void* D)
{
cmsUInt8Number r, g, b;
cmsS15Fixed16Number rx, ry, rz;
cmsS15Fixed16Number c0, c1, c2, c3, Rest;
int OutChan;
r... | DoS | 0 | void PrelinEval8(register const cmsUInt16Number Input[],
register cmsUInt16Number Output[],
register const void* D)
{
cmsUInt8Number r, g, b;
cmsS15Fixed16Number rx, ry, rz;
cmsS15Fixed16Number c0, c1, c2, c3, Rest;
int OutChan;
r... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,879 | void PrelinOpt16free(cmsContext ContextID, void* ptr)
{
Prelin16Data* p16 = (Prelin16Data*) ptr;
_cmsFree(ContextID, p16 ->EvalCurveOut16);
_cmsFree(ContextID, p16 ->ParamsCurveOut16);
_cmsFree(ContextID, p16);
}
| DoS | 0 | void PrelinOpt16free(cmsContext ContextID, void* ptr)
{
Prelin16Data* p16 = (Prelin16Data*) ptr;
_cmsFree(ContextID, p16 ->EvalCurveOut16);
_cmsFree(ContextID, p16 ->ParamsCurveOut16);
_cmsFree(ContextID, p16);
}
| @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,880 | Prelin8Data* PrelinOpt8alloc(cmsContext ContextID, const cmsInterpParams* p, cmsToneCurve* G[3])
{
int i;
cmsUInt16Number Input[3];
cmsS15Fixed16Number v1, v2, v3;
Prelin8Data* p8;
p8 = _cmsMallocZero(ContextID, sizeof(Prelin8Data));
if (p8 == NULL) return NULL;
for (i=0; i < 256; i++) {
... | DoS | 0 | Prelin8Data* PrelinOpt8alloc(cmsContext ContextID, const cmsInterpParams* p, cmsToneCurve* G[3])
{
int i;
cmsUInt16Number Input[3];
cmsS15Fixed16Number v1, v2, v3;
Prelin8Data* p8;
p8 = _cmsMallocZero(ContextID, sizeof(Prelin8Data));
if (p8 == NULL) return NULL;
for (i=0; i < 256; i++) {
... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,881 | void SlopeLimiting(cmsToneCurve* g)
{
int BeginVal, EndVal;
int AtBegin = (int) floor((cmsFloat64Number) g ->nEntries * 0.02 + 0.5); // Cutoff at 2%
int AtEnd = g ->nEntries - AtBegin - 1; // And 98%
cmsFloat64Number Val, Slope, beta;
int i;
if (cmsIsToneCur... | DoS | 0 | void SlopeLimiting(cmsToneCurve* g)
{
int BeginVal, EndVal;
int AtBegin = (int) floor((cmsFloat64Number) g ->nEntries * 0.02 + 0.5); // Cutoff at 2%
int AtEnd = g ->nEntries - AtBegin - 1; // And 98%
cmsFloat64Number Val, Slope, beta;
int i;
if (cmsIsToneCur... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,882 | int XFormSampler16(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
{
cmsPipeline* Lut = (cmsPipeline*) Cargo;
cmsFloat32Number InFloat[cmsMAXCHANNELS], OutFloat[cmsMAXCHANNELS];
cmsUInt32Number i;
_cmsAssert(Lut -> InputChannels < cmsMAXCHANNELS);
_cmsAsse... | DoS | 0 | int XFormSampler16(register const cmsUInt16Number In[], register cmsUInt16Number Out[], register void* Cargo)
{
cmsPipeline* Lut = (cmsPipeline*) Cargo;
cmsFloat32Number InFloat[cmsMAXCHANNELS], OutFloat[cmsMAXCHANNELS];
cmsUInt32Number i;
_cmsAssert(Lut -> InputChannels < cmsMAXCHANNELS);
_cmsAsse... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,883 | cmsBool _Remove1Op(cmsPipeline* Lut, cmsStageSignature UnaryOp)
{
cmsStage** pt = &Lut ->Elements;
cmsBool AnyOpt = FALSE;
while (*pt != NULL) {
if ((*pt) ->Implements == UnaryOp) {
_RemoveElement(pt);
AnyOpt = TRUE;
}
else
pt = &((*pt) -> Next);... | DoS | 0 | cmsBool _Remove1Op(cmsPipeline* Lut, cmsStageSignature UnaryOp)
{
cmsStage** pt = &Lut ->Elements;
cmsBool AnyOpt = FALSE;
while (*pt != NULL) {
if ((*pt) ->Implements == UnaryOp) {
_RemoveElement(pt);
AnyOpt = TRUE;
}
else
pt = &((*pt) -> Next);... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,884 | cmsBool _Remove2Op(cmsPipeline* Lut, cmsStageSignature Op1, cmsStageSignature Op2)
{
cmsStage** pt1;
cmsStage** pt2;
cmsBool AnyOpt = FALSE;
pt1 = &Lut ->Elements;
if (*pt1 == NULL) return AnyOpt;
while (*pt1 != NULL) {
pt2 = &((*pt1) -> Next);
if (*pt2 == NULL) return AnyOpt;... | DoS | 0 | cmsBool _Remove2Op(cmsPipeline* Lut, cmsStageSignature Op1, cmsStageSignature Op2)
{
cmsStage** pt1;
cmsStage** pt2;
cmsBool AnyOpt = FALSE;
pt1 = &Lut ->Elements;
if (*pt1 == NULL) return AnyOpt;
while (*pt1 != NULL) {
pt2 = &((*pt1) -> Next);
if (*pt2 == NULL) return AnyOpt;... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,885 | cmsBool _cmsOptimizePipeline(cmsPipeline** PtrLut,
int Intent,
cmsUInt32Number* InputFormat,
cmsUInt32Number* OutputFormat,
cmsUInt32Number* dwFlags)
{
_cmsOptimizationCollection* Opts... | DoS | 0 | cmsBool _cmsOptimizePipeline(cmsPipeline** PtrLut,
int Intent,
cmsUInt32Number* InputFormat,
cmsUInt32Number* OutputFormat,
cmsUInt32Number* dwFlags)
{
_cmsOptimizationCollection* Opts... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,886 | cmsBool _cmsRegisterOptimizationPlugin(cmsContext id, cmsPluginBase* Data)
{
cmsPluginOptimization* Plugin = (cmsPluginOptimization*) Data;
_cmsOptimizationCollection* fl;
if (Data == NULL) {
OptimizationCollection = DefaultOptimization;
return TRUE;
}
if (Plugin ->OptimizePtr ==... | DoS | 0 | cmsBool _cmsRegisterOptimizationPlugin(cmsContext id, cmsPluginBase* Data)
{
cmsPluginOptimization* Plugin = (cmsPluginOptimization*) Data;
_cmsOptimizationCollection* fl;
if (Data == NULL) {
OptimizationCollection = DefaultOptimization;
return TRUE;
}
if (Plugin ->OptimizePtr ==... | @@ -1179,6 +1179,16 @@ Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsT
c16->Curves[i] = _cmsCalloc(ContextID, nElements, sizeof(cmsUInt16Number));
+ if (c16->Curves[i] == NULL) {
+
+ for (j=0; j < i; j++) {
+ _cmsFree(ContextID, c16->Curves[... | null | null | null |
32,887 | void _mkp_exit()
{
}
| Bypass | 0 | void _mkp_exit()
{
}
| @@ -349,7 +349,8 @@ int _mkp_stage_30(struct plugin *p,
(void) cs;
PLUGIN_TRACE("[FD %i] Mandril validating URL", cs->socket);
- if (mk_security_check_url(sr->uri) < 0) {
+
+ if (mk_security_check_url(sr->uri_processed) < 0) {
PLUGIN_TRACE("[FD %i] Close connection, blocked URL", cs->socket);... | CWE-264 | null | null |
32,888 | int _mkp_init(struct plugin_api **api, char *confdir)
{
mk_api = *api;
/* Init security lists */
mk_list_init(&mk_secure_ip);
mk_list_init(&mk_secure_url);
mk_list_init(&mk_secure_deny_hotlink);
/* Read configuration */
mk_security_conf(confdir);
return 0;
}
| Bypass | 0 | int _mkp_init(struct plugin_api **api, char *confdir)
{
mk_api = *api;
/* Init security lists */
mk_list_init(&mk_secure_ip);
mk_list_init(&mk_secure_url);
mk_list_init(&mk_secure_deny_hotlink);
/* Read configuration */
mk_security_conf(confdir);
return 0;
}
| @@ -349,7 +349,8 @@ int _mkp_stage_30(struct plugin *p,
(void) cs;
PLUGIN_TRACE("[FD %i] Mandril validating URL", cs->socket);
- if (mk_security_check_url(sr->uri) < 0) {
+
+ if (mk_security_check_url(sr->uri_processed) < 0) {
PLUGIN_TRACE("[FD %i] Close connection, blocked URL", cs->socket);... | CWE-264 | null | null |
32,889 | int _mkp_stage_10(unsigned int socket, struct sched_connection *conx)
{
(void) conx;
/* Validate ip address with Mandril rules */
if (mk_security_check_ip(socket) != 0) {
PLUGIN_TRACE("[FD %i] Mandril close connection", socket);
return MK_PLUGIN_RET_CLOSE_CONX;
}
return MK_PLUGIN_RE... | Bypass | 0 | int _mkp_stage_10(unsigned int socket, struct sched_connection *conx)
{
(void) conx;
/* Validate ip address with Mandril rules */
if (mk_security_check_ip(socket) != 0) {
PLUGIN_TRACE("[FD %i] Mandril close connection", socket);
return MK_PLUGIN_RET_CLOSE_CONX;
}
return MK_PLUGIN_RE... | @@ -349,7 +349,8 @@ int _mkp_stage_30(struct plugin *p,
(void) cs;
PLUGIN_TRACE("[FD %i] Mandril validating URL", cs->socket);
- if (mk_security_check_url(sr->uri) < 0) {
+
+ if (mk_security_check_url(sr->uri_processed) < 0) {
PLUGIN_TRACE("[FD %i] Close connection, blocked URL", cs->socket);... | CWE-264 | null | null |
32,890 | static int mk_security_check_hotlink(mk_ptr_t url, mk_ptr_t host,
mk_ptr_t referer)
{
mk_ptr_t ref_host = parse_referer_host(referer);
unsigned int domains_matched = 0;
int i = 0;
const char *curA, *curB;
struct mk_list *head;
struct mk_secure_deny_hotlink_t *entry;
if (ref_host.dat... | Bypass | 0 | static int mk_security_check_hotlink(mk_ptr_t url, mk_ptr_t host,
mk_ptr_t referer)
{
mk_ptr_t ref_host = parse_referer_host(referer);
unsigned int domains_matched = 0;
int i = 0;
const char *curA, *curB;
struct mk_list *head;
struct mk_secure_deny_hotlink_t *entry;
if (ref_host.dat... | @@ -349,7 +349,8 @@ int _mkp_stage_30(struct plugin *p,
(void) cs;
PLUGIN_TRACE("[FD %i] Mandril validating URL", cs->socket);
- if (mk_security_check_url(sr->uri) < 0) {
+
+ if (mk_security_check_url(sr->uri_processed) < 0) {
PLUGIN_TRACE("[FD %i] Close connection, blocked URL", cs->socket);... | CWE-264 | null | null |
32,891 | static int mk_security_check_ip(int socket)
{
int network;
struct mk_secure_ip_t *entry;
struct mk_list *head;
struct in_addr addr_t, *addr = &addr_t;
socklen_t len = sizeof(addr);
if (getpeername(socket, (struct sockaddr *)&addr_t, &len) < 0) {
return -1;
}
PLUGIN_TRACE("[FD %... | Bypass | 0 | static int mk_security_check_ip(int socket)
{
int network;
struct mk_secure_ip_t *entry;
struct mk_list *head;
struct in_addr addr_t, *addr = &addr_t;
socklen_t len = sizeof(addr);
if (getpeername(socket, (struct sockaddr *)&addr_t, &len) < 0) {
return -1;
}
PLUGIN_TRACE("[FD %... | @@ -349,7 +349,8 @@ int _mkp_stage_30(struct plugin *p,
(void) cs;
PLUGIN_TRACE("[FD %i] Mandril validating URL", cs->socket);
- if (mk_security_check_url(sr->uri) < 0) {
+
+ if (mk_security_check_url(sr->uri_processed) < 0) {
PLUGIN_TRACE("[FD %i] Close connection, blocked URL", cs->socket);... | CWE-264 | null | null |
32,892 | static int mk_security_check_url(mk_ptr_t url)
{
int n;
struct mk_list *head;
struct mk_secure_url_t *entry;
mk_list_foreach(head, &mk_secure_url) {
entry = mk_list_entry(head, struct mk_secure_url_t, _head);
n = mk_api->str_search_n(url.data, entry->criteria, MK_STR_INSENSITIVE, url.le... | Bypass | 0 | static int mk_security_check_url(mk_ptr_t url)
{
int n;
struct mk_list *head;
struct mk_secure_url_t *entry;
mk_list_foreach(head, &mk_secure_url) {
entry = mk_list_entry(head, struct mk_secure_url_t, _head);
n = mk_api->str_search_n(url.data, entry->criteria, MK_STR_INSENSITIVE, url.le... | @@ -349,7 +349,8 @@ int _mkp_stage_30(struct plugin *p,
(void) cs;
PLUGIN_TRACE("[FD %i] Mandril validating URL", cs->socket);
- if (mk_security_check_url(sr->uri) < 0) {
+
+ if (mk_security_check_url(sr->uri_processed) < 0) {
PLUGIN_TRACE("[FD %i] Close connection, blocked URL", cs->socket);... | CWE-264 | null | null |
32,893 | mk_ptr_t parse_referer_host(mk_ptr_t ref)
{
unsigned int i, beginHost, endHost;
mk_ptr_t host;
host.data = NULL;
host.len = 0;
for (i = 0; i < ref.len && !(ref.data[i] == '/' && ref.data[i+1] == '/'); i++);
if (i == ref.len) {
goto error;
}
beginHost = i + 2;
for (; i < re... | Bypass | 0 | mk_ptr_t parse_referer_host(mk_ptr_t ref)
{
unsigned int i, beginHost, endHost;
mk_ptr_t host;
host.data = NULL;
host.len = 0;
for (i = 0; i < ref.len && !(ref.data[i] == '/' && ref.data[i+1] == '/'); i++);
if (i == ref.len) {
goto error;
}
beginHost = i + 2;
for (; i < re... | @@ -349,7 +349,8 @@ int _mkp_stage_30(struct plugin *p,
(void) cs;
PLUGIN_TRACE("[FD %i] Mandril validating URL", cs->socket);
- if (mk_security_check_url(sr->uri) < 0) {
+
+ if (mk_security_check_url(sr->uri_processed) < 0) {
PLUGIN_TRACE("[FD %i] Close connection, blocked URL", cs->socket);... | CWE-264 | null | null |
32,894 | static int authenticate_and_decrypt_nss_2_0 (
struct crypto_instance *instance,
unsigned char *buf,
int *buf_len)
{
if (hash_to_nss[instance->crypto_hash_type]) {
unsigned char tmp_hash[hash_len[instance->crypto_hash_type]];
unsigned char *hash = buf;
unsigned char *data = hash + hash_len[instance->crypto_has... | DoS | 0 | static int authenticate_and_decrypt_nss_2_0 (
struct crypto_instance *instance,
unsigned char *buf,
int *buf_len)
{
if (hash_to_nss[instance->crypto_hash_type]) {
unsigned char tmp_hash[hash_len[instance->crypto_hash_type]];
unsigned char *hash = buf;
unsigned char *data = hash + hash_len[instance->crypto_has... | @@ -478,8 +478,8 @@ static int init_nss_hash(struct crypto_instance *instance)
}
hash_param.type = siBuffer;
- hash_param.data = 0;
- hash_param.len = 0;
+ hash_param.data = instance->private_key;
+ hash_param.len = instance->private_key_len;
hash_slot = PK11_GetBestSlot(hash_to_nss[instance->crypto_hash_type... | null | null | null |
32,895 | static int authenticate_nss_2_2 (
struct crypto_instance *instance,
unsigned char *buf,
int *buf_len)
{
if (hash_to_nss[instance->crypto_hash_type]) {
unsigned char tmp_hash[hash_len[instance->crypto_hash_type]];
int datalen = *buf_len - hash_len[instance->crypto_hash_type];
if (calculate_nss_has... | DoS | 0 | static int authenticate_nss_2_2 (
struct crypto_instance *instance,
unsigned char *buf,
int *buf_len)
{
if (hash_to_nss[instance->crypto_hash_type]) {
unsigned char tmp_hash[hash_len[instance->crypto_hash_type]];
int datalen = *buf_len - hash_len[instance->crypto_hash_type];
if (calculate_nss_has... | @@ -478,8 +478,8 @@ static int init_nss_hash(struct crypto_instance *instance)
}
hash_param.type = siBuffer;
- hash_param.data = 0;
- hash_param.len = 0;
+ hash_param.data = instance->private_key;
+ hash_param.len = instance->private_key_len;
hash_slot = PK11_GetBestSlot(hash_to_nss[instance->crypto_hash_type... | null | null | null |
32,896 | static int calculate_nss_hash(
struct crypto_instance *instance,
const unsigned char *buf,
const size_t buf_len,
unsigned char *hash)
{
PK11Context* hash_context = NULL;
SECItem hash_param;
unsigned int hash_tmp_outlen = 0;
unsigned char hash_block[hash_block_len[instance->crypto_hash_type]];
int err = -1;
... | DoS | 0 | static int calculate_nss_hash(
struct crypto_instance *instance,
const unsigned char *buf,
const size_t buf_len,
unsigned char *hash)
{
PK11Context* hash_context = NULL;
SECItem hash_param;
unsigned int hash_tmp_outlen = 0;
unsigned char hash_block[hash_block_len[instance->crypto_hash_type]];
int err = -1;
... | @@ -478,8 +478,8 @@ static int init_nss_hash(struct crypto_instance *instance)
}
hash_param.type = siBuffer;
- hash_param.data = 0;
- hash_param.len = 0;
+ hash_param.data = instance->private_key;
+ hash_param.len = instance->private_key_len;
hash_slot = PK11_GetBestSlot(hash_to_nss[instance->crypto_hash_type... | null | null | null |
32,897 | int crypto_authenticate_and_decrypt (struct crypto_instance *instance,
unsigned char *buf,
int *buf_len)
{
struct crypto_config_header *cch = (struct crypto_config_header *)buf;
switch (instance->crypto_compat_type) {
case CRYPTO_COMPAT_2_0:
/*
* decode crypto config of incoming packets
*/
if (cc... | DoS | 0 | int crypto_authenticate_and_decrypt (struct crypto_instance *instance,
unsigned char *buf,
int *buf_len)
{
struct crypto_config_header *cch = (struct crypto_config_header *)buf;
switch (instance->crypto_compat_type) {
case CRYPTO_COMPAT_2_0:
/*
* decode crypto config of incoming packets
*/
if (cc... | @@ -478,8 +478,8 @@ static int init_nss_hash(struct crypto_instance *instance)
}
hash_param.type = siBuffer;
- hash_param.data = 0;
- hash_param.len = 0;
+ hash_param.data = instance->private_key;
+ hash_param.len = instance->private_key_len;
hash_slot = PK11_GetBestSlot(hash_to_nss[instance->crypto_hash_type... | null | null | null |
32,898 | int crypto_encrypt_and_sign (
struct crypto_instance *instance,
const unsigned char *buf_in,
const size_t buf_in_len,
unsigned char *buf_out,
size_t *buf_out_len)
{
struct crypto_config_header *cch = (struct crypto_config_header *)buf_out;
int err;
switch (instance->crypto_compat_type) {
case CRYPTO_COMPAT_2... | DoS | 0 | int crypto_encrypt_and_sign (
struct crypto_instance *instance,
const unsigned char *buf_in,
const size_t buf_in_len,
unsigned char *buf_out,
size_t *buf_out_len)
{
struct crypto_config_header *cch = (struct crypto_config_header *)buf_out;
int err;
switch (instance->crypto_compat_type) {
case CRYPTO_COMPAT_2... | @@ -478,8 +478,8 @@ static int init_nss_hash(struct crypto_instance *instance)
}
hash_param.type = siBuffer;
- hash_param.data = 0;
- hash_param.len = 0;
+ hash_param.data = instance->private_key;
+ hash_param.len = instance->private_key_len;
hash_slot = PK11_GetBestSlot(hash_to_nss[instance->crypto_hash_type... | null | null | null |
32,899 | struct crypto_instance *crypto_init(
const unsigned char *private_key,
unsigned int private_key_len,
const char *crypto_cipher_type,
const char *crypto_hash_type,
const char *crypto_compat_type,
void (*log_printf_func) (
int level,
int subsys,
const char *function,
const char *... | DoS | 0 | struct crypto_instance *crypto_init(
const unsigned char *private_key,
unsigned int private_key_len,
const char *crypto_cipher_type,
const char *crypto_hash_type,
const char *crypto_compat_type,
void (*log_printf_func) (
int level,
int subsys,
const char *function,
const char *... | @@ -478,8 +478,8 @@ static int init_nss_hash(struct crypto_instance *instance)
}
hash_param.type = siBuffer;
- hash_param.data = 0;
- hash_param.len = 0;
+ hash_param.data = instance->private_key;
+ hash_param.len = instance->private_key_len;
hash_slot = PK11_GetBestSlot(hash_to_nss[instance->crypto_hash_type... | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.