idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
200
bgp_attr_unintern (struct attr **attr) { struct attr *ret; struct attr tmp; /* Decrement attribute reference. */ (*attr)->refcnt--; tmp = *(*attr); if ((*attr)->extra) { tmp.extra = bgp_attr_extra_new (); memcpy (tmp.extra, (*attr)->extra, sizeof (struct attr_extra)); } /* ...
DoS
0
bgp_attr_unintern (struct attr **attr) { struct attr *ret; struct attr tmp; /* Decrement attribute reference. */ (*attr)->refcnt--; tmp = *(*attr); if ((*attr)->extra) { tmp.extra = bgp_attr_extra_new (); memcpy (tmp.extra, (*attr)->extra, sizeof (struct attr_extra)); } /* ...
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
201
bgp_attr_unintern_sub (struct attr *attr) { /* aspath refcount shoud be decrement. */ if (attr->aspath) aspath_unintern (&attr->aspath); UNSET_FLAG(attr->flag, BGP_ATTR_AS_PATH); if (attr->community) community_unintern (&attr->community); UNSET_FLAG(attr->flag, BGP_ATTR_COMMUNITIES); if (attr-...
DoS
0
bgp_attr_unintern_sub (struct attr *attr) { /* aspath refcount shoud be decrement. */ if (attr->aspath) aspath_unintern (&attr->aspath); UNSET_FLAG(attr->flag, BGP_ATTR_AS_PATH); if (attr->community) community_unintern (&attr->community); UNSET_FLAG(attr->flag, BGP_ATTR_COMMUNITIES); if (attr-...
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
202
bgp_dump_routes_attr (struct stream *s, struct attr *attr, struct prefix *prefix) { unsigned long cp; unsigned long len; size_t aspath_lenp; struct aspath *aspath; /* Remember current pointer. */ cp = stream_get_endp (s); /* Place holder of length. */ stream_putw (s, 0); /* O...
DoS
0
bgp_dump_routes_attr (struct stream *s, struct attr *attr, struct prefix *prefix) { unsigned long cp; unsigned long len; size_t aspath_lenp; struct aspath *aspath; /* Remember current pointer. */ cp = stream_get_endp (s); /* Place holder of length. */ stream_putw (s, 0); /* O...
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
203
bgp_mp_reach_parse (struct bgp_attr_parser_args *args, struct bgp_nlri *mp_update) { afi_t afi; safi_t safi; bgp_size_t nlri_len; size_t start; int ret; struct stream *s; struct peer *const peer = args->peer; struct attr *const attr = args->attr; const bgp_size_t length = args->l...
DoS
0
bgp_mp_reach_parse (struct bgp_attr_parser_args *args, struct bgp_nlri *mp_update) { afi_t afi; safi_t safi; bgp_size_t nlri_len; size_t start; int ret; struct stream *s; struct peer *const peer = args->peer; struct attr *const attr = args->attr; const bgp_size_t length = args->l...
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
204
bgp_packet_attribute (struct bgp *bgp, struct peer *peer, struct stream *s, struct attr *attr, struct prefix *p, afi_t afi, safi_t safi, struct peer *from, struct prefix_rd *prd, u_char *tag) { size_t cp; size_t aspath_sizep; struct aspath *aspath; int send_as4_path = 0; int send_as4_a...
DoS
0
bgp_packet_attribute (struct bgp *bgp, struct peer *peer, struct stream *s, struct attr *attr, struct prefix *p, afi_t afi, safi_t safi, struct peer *from, struct prefix_rd *prd, u_char *tag) { size_t cp; size_t aspath_sizep; struct aspath *aspath; int send_as4_path = 0; int send_as4_a...
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
205
bgp_packet_withdraw (struct peer *peer, struct stream *s, struct prefix *p, afi_t afi, safi_t safi, struct prefix_rd *prd, u_char *tag) { unsigned long cp; unsigned long attrlen_pnt; bgp_size_t size; cp = stream_get_endp (s); stream_putc (s, BGP_ATTR_FLAG_OPTIONAL); stream_putc (s, BGP_ATTR_...
DoS
0
bgp_packet_withdraw (struct peer *peer, struct stream *s, struct prefix *p, afi_t afi, safi_t safi, struct prefix_rd *prd, u_char *tag) { unsigned long cp; unsigned long attrlen_pnt; bgp_size_t size; cp = stream_get_endp (s); stream_putc (s, BGP_ATTR_FLAG_OPTIONAL); stream_putc (s, BGP_ATTR_...
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
206
cluster_finish (void) { hash_free (cluster_hash); cluster_hash = NULL; }
DoS
0
cluster_finish (void) { hash_free (cluster_hash); cluster_hash = NULL; }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
207
cluster_free (struct cluster_list *cluster) { if (cluster->list) XFREE (MTYPE_CLUSTER_VAL, cluster->list); XFREE (MTYPE_CLUSTER, cluster); }
DoS
0
cluster_free (struct cluster_list *cluster) { if (cluster->list) XFREE (MTYPE_CLUSTER_VAL, cluster->list); XFREE (MTYPE_CLUSTER, cluster); }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
208
cluster_hash_alloc (void *p) { struct cluster_list * val = (struct cluster_list *) p; struct cluster_list *cluster; cluster = XMALLOC (MTYPE_CLUSTER, sizeof (struct cluster_list)); cluster->length = val->length; if (cluster->length) { cluster->list = XMALLOC (MTYPE_CLUSTER_VAL, val->length); ...
DoS
0
cluster_hash_alloc (void *p) { struct cluster_list * val = (struct cluster_list *) p; struct cluster_list *cluster; cluster = XMALLOC (MTYPE_CLUSTER, sizeof (struct cluster_list)); cluster->length = val->length; if (cluster->length) { cluster->list = XMALLOC (MTYPE_CLUSTER_VAL, val->length); ...
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
209
cluster_hash_key_make (void *p) { const struct cluster_list *cluster = p; return jhash(cluster->list, cluster->length, 0); }
DoS
0
cluster_hash_key_make (void *p) { const struct cluster_list *cluster = p; return jhash(cluster->list, cluster->length, 0); }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
210
cluster_init (void) { cluster_hash = hash_create (cluster_hash_key_make, cluster_hash_cmp); }
DoS
0
cluster_init (void) { cluster_hash = hash_create (cluster_hash_key_make, cluster_hash_cmp); }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
211
cluster_intern (struct cluster_list *cluster) { struct cluster_list *find; find = hash_get (cluster_hash, cluster, cluster_hash_alloc); find->refcnt++; return find; }
DoS
0
cluster_intern (struct cluster_list *cluster) { struct cluster_list *find; find = hash_get (cluster_hash, cluster, cluster_hash_alloc); find->refcnt++; return find; }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
212
cluster_loop_check (struct cluster_list *cluster, struct in_addr originator) { int i; for (i = 0; i < cluster->length / 4; i++) if (cluster->list[i].s_addr == originator.s_addr) return 1; return 0; }
DoS
0
cluster_loop_check (struct cluster_list *cluster, struct in_addr originator) { int i; for (i = 0; i < cluster->length / 4; i++) if (cluster->list[i].s_addr == originator.s_addr) return 1; return 0; }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
213
cluster_unintern (struct cluster_list *cluster) { if (cluster->refcnt) cluster->refcnt--; if (cluster->refcnt == 0) { hash_release (cluster_hash, cluster); cluster_free (cluster); } }
DoS
0
cluster_unintern (struct cluster_list *cluster) { if (cluster->refcnt) cluster->refcnt--; if (cluster->refcnt == 0) { hash_release (cluster_hash, cluster); cluster_free (cluster); } }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
214
transit_finish (void) { hash_free (transit_hash); transit_hash = NULL; }
DoS
0
transit_finish (void) { hash_free (transit_hash); transit_hash = NULL; }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
215
transit_free (struct transit *transit) { if (transit->val) XFREE (MTYPE_TRANSIT_VAL, transit->val); XFREE (MTYPE_TRANSIT, transit); }
DoS
0
transit_free (struct transit *transit) { if (transit->val) XFREE (MTYPE_TRANSIT_VAL, transit->val); XFREE (MTYPE_TRANSIT, transit); }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
216
transit_hash_alloc (void *p) { /* Transit structure is already allocated. */ return p; }
DoS
0
transit_hash_alloc (void *p) { /* Transit structure is already allocated. */ return p; }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
217
transit_hash_cmp (const void *p1, const void *p2) { const struct transit * transit1 = p1; const struct transit * transit2 = p2; return (transit1->length == transit2->length && memcmp (transit1->val, transit2->val, transit1->length) == 0); }
DoS
0
transit_hash_cmp (const void *p1, const void *p2) { const struct transit * transit1 = p1; const struct transit * transit2 = p2; return (transit1->length == transit2->length && memcmp (transit1->val, transit2->val, transit1->length) == 0); }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
218
transit_init (void) { transit_hash = hash_create (transit_hash_key_make, transit_hash_cmp); }
DoS
0
transit_init (void) { transit_hash = hash_create (transit_hash_key_make, transit_hash_cmp); }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
219
transit_intern (struct transit *transit) { struct transit *find; find = hash_get (transit_hash, transit, transit_hash_alloc); if (find != transit) transit_free (transit); find->refcnt++; return find; }
DoS
0
transit_intern (struct transit *transit) { struct transit *find; find = hash_get (transit_hash, transit, transit_hash_alloc); if (find != transit) transit_free (transit); find->refcnt++; return find; }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
220
transit_unintern (struct transit *transit) { if (transit->refcnt) transit->refcnt--; if (transit->refcnt == 0) { hash_release (transit_hash, transit); transit_free (transit); } }
DoS
0
transit_unintern (struct transit *transit) { if (transit->refcnt) transit->refcnt--; if (transit->refcnt == 0) { hash_release (transit_hash, transit); transit_free (transit); } }
@@ -1646,7 +1646,7 @@ bgp_attr_ext_communities (struct bgp_attr_parser_args *args) static bgp_attr_parse_ret_t bgp_attr_unknown (struct bgp_attr_parser_args *args) { - bgp_size_t total; + bgp_size_t total = args->total; struct transit *transit; struct attr_extra *attre; struct peer *const peer = args->pee...
null
null
null
221
bgr2cmyk(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv) { float c = 1 - sv[2]; float m = 1 - sv[1]; float y = 1 - sv[0]; float k = fz_min(c, fz_min(m, y)); dv[0] = c - k; dv[1] = m - k; dv[2] = y - k; dv[3] = k; }
DoS
0
bgr2cmyk(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv) { float c = 1 - sv[2]; float m = 1 - sv[1]; float y = 1 - sv[0]; float k = fz_min(c, fz_min(m, y)); dv[0] = c - k; dv[1] = m - k; dv[2] = y - k; dv[3] = k; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
222
bgr2g(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv) { dv[0] = sv[0] * 0.11f + sv[1] * 0.59f + sv[2] * 0.3f; }
DoS
0
bgr2g(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv) { dv[0] = sv[0] * 0.11f + sv[1] * 0.59f + sv[2] * 0.3f; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
223
static void bgr_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *bgr, float *rgb) { rgb[0] = bgr[2]; rgb[1] = bgr[1]; rgb[2] = bgr[0]; }
DoS
0
static void bgr_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *bgr, float *rgb) { rgb[0] = bgr[2]; rgb[1] = bgr[1]; rgb[2] = bgr[0]; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
224
clamp_default(const fz_colorspace *cs, const float *src, float *dst) { int i; for (i = 0; i < cs->n; i++) dst[i] = fz_clamp(src[i], 0, 1); }
DoS
0
clamp_default(const fz_colorspace *cs, const float *src, float *dst) { int i; for (i = 0; i < cs->n; i++) dst[i] = fz_clamp(src[i], 0, 1); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
225
clamp_indexed(const fz_colorspace *cs, const float *in, float *out) { struct indexed *idx = cs->data; *out = fz_clamp(*in, 0, idx->high) / 255.0f; /* To do, avoid 255 divide */ }
DoS
0
clamp_indexed(const fz_colorspace *cs, const float *in, float *out) { struct indexed *idx = cs->data; *out = fz_clamp(*in, 0, idx->high) / 255.0f; /* To do, avoid 255 divide */ }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
226
clamp_lab(const fz_colorspace *cs, const float *src, float *dst) { int i; for (i = 0; i < 3; i++) dst[i] = fz_clamp(src[i], i ? -128 : 0, i ? 127 : 100); }
DoS
0
clamp_lab(const fz_colorspace *cs, const float *src, float *dst) { int i; for (i = 0; i < 3; i++) dst[i] = fz_clamp(src[i], i ? -128 : 0, i ? 127 : 100); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
227
clamp_lab_icc(const fz_colorspace *cs, const float *src, float *dst) { dst[0] = (fz_clamp(src[0], 0, 100)) / 100.0f; dst[1] = (fz_clamp(src[1], -128, 127) + 128.0f) / 256; dst[2] = (fz_clamp(src[2], -128, 127) + 128.0f) / 256; }
DoS
0
clamp_lab_icc(const fz_colorspace *cs, const float *src, float *dst) { dst[0] = (fz_clamp(src[0], 0, 100)) / 100.0f; dst[1] = (fz_clamp(src[1], -128, 127) + 128.0f) / 256; dst[2] = (fz_clamp(src[2], -128, 127) + 128.0f) / 256; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
228
cmyk2bgr(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv) { #ifdef SLOWCMYK float rgb[3]; cmyk_to_rgb(ctx, NULL, sv, rgb); dv[0] = rgb[2]; dv[1] = rgb[1]; dv[2] = rgb[0]; #else dv[0] = 1 - fz_min(sv[2] + sv[3], 1); dv[1] = 1 - fz_min(sv[1] + sv[3], 1); dv[2] = 1 - fz_min(sv[0] + sv[3], 1); #...
DoS
0
cmyk2bgr(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv) { #ifdef SLOWCMYK float rgb[3]; cmyk_to_rgb(ctx, NULL, sv, rgb); dv[0] = rgb[2]; dv[1] = rgb[1]; dv[2] = rgb[0]; #else dv[0] = 1 - fz_min(sv[2] + sv[3], 1); dv[1] = 1 - fz_min(sv[1] + sv[3], 1); dv[2] = 1 - fz_min(sv[0] + sv[3], 1); #...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
229
cmyk2g(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv) { float c = sv[0] * 0.3f; float m = sv[1] * 0.59f; float y = sv[2] * 0.11f; dv[0] = 1 - fz_min(c + m + y + sv[3], 1); }
DoS
0
cmyk2g(fz_context *ctx, fz_color_converter *cc, float *dv, const float *sv) { float c = sv[0] * 0.3f; float m = sv[1] * 0.59f; float y = sv[2] * 0.11f; dv[0] = 1 - fz_min(c + m + y + sv[3], 1); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
230
static void cmyk_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *cmyk, float *rgb) { #ifdef SLOWCMYK /* from poppler */ float c = cmyk[0], m = cmyk[1], y = cmyk[2], k = cmyk[3]; float r, g, b, x; float cm = c * m; float c1m = m - cm; float cm1 = c - cm; float c1m1 = 1 - m - cm1; float c1m1y = c1m1 ...
DoS
0
static void cmyk_to_rgb(fz_context *ctx, const fz_colorspace *cs, const float *cmyk, float *rgb) { #ifdef SLOWCMYK /* from poppler */ float c = cmyk[0], m = cmyk[1], y = cmyk[2], k = cmyk[3]; float r, g, b, x; float cm = c * m; float c1m = m - cm; float cm1 = c - cm; float c1m1 = 1 - m - cm1; float c1m1y = c1m1 ...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
231
convert_to_icc_base(fz_context *ctx, fz_colorspace *srcs, float *src_f, float *des_f) { float temp_f[FZ_MAX_COLORS]; fz_colorspace *base_cs = srcs->get_base(srcs); if (fz_colorspace_is_icc(ctx, base_cs) || fz_colorspace_is_cal(ctx, base_cs) || fz_colorspace_is_lab(ctx, base_cs)) srcs->to_ccs(ctx, srcs, src_f, des...
DoS
0
convert_to_icc_base(fz_context *ctx, fz_colorspace *srcs, float *src_f, float *des_f) { float temp_f[FZ_MAX_COLORS]; fz_colorspace *base_cs = srcs->get_base(srcs); if (fz_colorspace_is_icc(ctx, base_cs) || fz_colorspace_is_cal(ctx, base_cs) || fz_colorspace_is_lab(ctx, base_cs)) srcs->to_ccs(ctx, srcs, src_f, des...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
232
static void fast_any_to_alpha(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { assert(copy_spots && dst->s == 0 && src->s == 0); if (!src->alpha) fz_clear_pixmap_with_value(ctx, dst, 255); else { ...
DoS
0
static void fast_any_to_alpha(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { assert(copy_spots && dst->s == 0 && src->s == 0); if (!src->alpha) fz_clear_pixmap_with_value(ctx, dst, 255); else { ...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
233
static void fast_bgr_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
DoS
0
static void fast_bgr_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
234
static void fast_bgr_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
DoS
0
static void fast_bgr_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
235
static void fast_cmyk_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; ...
DoS
0
static void fast_cmyk_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; ...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
236
static void fast_cmyk_to_rgb(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
DoS
0
static void fast_cmyk_to_rgb(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
237
fast_cmyk_to_rgb_ARM(unsigned char *dst, unsigned char *src, int n) { asm volatile( ENTER_ARM "stmfd r13!,{r4-r11,r14} \n" "@ r0 = dst \n" "@ r1 = src \n" "@ r2 = n \n" "mov r12, #0 @ r12= CMYK = 0 \n" "b 2f @ enter loop \n" "1: @ White or Black \n" "@ Cunning trick: On entry...
DoS
0
fast_cmyk_to_rgb_ARM(unsigned char *dst, unsigned char *src, int n) { asm volatile( ENTER_ARM "stmfd r13!,{r4-r11,r14} \n" "@ r0 = dst \n" "@ r1 = src \n" "@ r2 = n \n" "mov r12, #0 @ r12= CMYK = 0 \n" "b 2f @ enter loop \n" "1: @ White or Black \n" "@ Cunning trick: On entry...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
238
static void fast_gray_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; ...
DoS
0
static void fast_gray_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; ...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
239
static void fast_gray_to_rgb(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
DoS
0
static void fast_gray_to_rgb(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
240
static void fast_rgb_to_bgr(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; in...
DoS
0
static void fast_rgb_to_bgr(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; in...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
241
static void fast_rgb_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
DoS
0
static void fast_rgb_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
242
static void fast_rgb_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
DoS
0
static void fast_rgb_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorspace *prf, const fz_default_colorspaces *default_cs, const fz_color_params *color_params, int copy_spots) { unsigned char *s = src->samples; unsigned char *d = dst->samples; size_t w = src->w; int h = src->h; int sn = src->n; i...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
243
free_cal(fz_context *ctx, fz_colorspace *cs) { fz_cal_colorspace *cal_data = cs->data; if (cal_data->profile != NULL) { fz_drop_buffer(ctx, cal_data->profile->buffer); fz_cmm_fin_profile(ctx, cal_data->profile); fz_free(ctx, cal_data->profile); } fz_free(ctx, cal_data); }
DoS
0
free_cal(fz_context *ctx, fz_colorspace *cs) { fz_cal_colorspace *cal_data = cs->data; if (cal_data->profile != NULL) { fz_drop_buffer(ctx, cal_data->profile->buffer); fz_cmm_fin_profile(ctx, cal_data->profile); fz_free(ctx, cal_data->profile); } fz_free(ctx, cal_data); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
244
free_icc(fz_context *ctx, fz_colorspace *cs) { fz_iccprofile *profile = cs->data; fz_drop_buffer(ctx, profile->buffer); fz_cmm_fin_profile(ctx, profile); fz_free(ctx, profile); }
DoS
0
free_icc(fz_context *ctx, fz_colorspace *cs) { fz_iccprofile *profile = cs->data; fz_drop_buffer(ctx, profile->buffer); fz_cmm_fin_profile(ctx, profile); fz_free(ctx, profile); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
245
fz_clamp_color(fz_context *ctx, const fz_colorspace *cs, const float *in, float *out) { cs->clamp(cs, in, out); }
DoS
0
fz_clamp_color(fz_context *ctx, const fz_colorspace *cs, const float *in, float *out) { cs->clamp(cs, in, out); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
246
fz_clone_default_colorspaces(fz_context *ctx, fz_default_colorspaces *base) { fz_default_colorspaces *default_cs = fz_malloc_struct(ctx, fz_default_colorspaces); default_cs->refs = 1; default_cs->gray = fz_keep_colorspace(ctx, base->gray); default_cs->rgb = fz_keep_colorspace(ctx, base->rgb); default_cs->cmyk = fz...
DoS
0
fz_clone_default_colorspaces(fz_context *ctx, fz_default_colorspaces *base) { fz_default_colorspaces *default_cs = fz_malloc_struct(ctx, fz_default_colorspaces); default_cs->refs = 1; default_cs->gray = fz_keep_colorspace(ctx, base->gray); default_cs->rgb = fz_keep_colorspace(ctx, base->rgb); default_cs->cmyk = fz...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
247
void fz_cmm_drop_instance(fz_context *ctx) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->drop_instance(ctx->cmm_instance); }
DoS
0
void fz_cmm_drop_instance(fz_context *ctx) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->drop_instance(ctx->cmm_instance); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
248
fz_cmm_fin_link(fz_context *ctx, fz_icclink *link) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->fin_link(ctx->cmm_instance, link); }
DoS
0
fz_cmm_fin_link(fz_context *ctx, fz_icclink *link) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->fin_link(ctx->cmm_instance, link); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
249
void fz_cmm_fin_profile(fz_context *ctx, fz_iccprofile *profile) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) if (profile && profile->cmm_handle != NULL) ctx->colorspace->cmm->fin_profile(ctx->cmm_instance, profile); }
DoS
0
void fz_cmm_fin_profile(fz_context *ctx, fz_iccprofile *profile) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) if (profile && profile->cmm_handle != NULL) ctx->colorspace->cmm->fin_profile(ctx->cmm_instance, profile); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
250
fz_cmm_init_link(fz_context *ctx, fz_icclink *link, const fz_iccprofile *dst, int dst_extras, const fz_iccprofile *src, int src_extras, const fz_iccprofile *prf, const fz_color_params *rend, int cmm_flags, int num_bytes, int copy_spots) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->...
DoS
0
fz_cmm_init_link(fz_context *ctx, fz_icclink *link, const fz_iccprofile *dst, int dst_extras, const fz_iccprofile *src, int src_extras, const fz_iccprofile *prf, const fz_color_params *rend, int cmm_flags, int num_bytes, int copy_spots) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
251
void fz_cmm_init_profile(fz_context *ctx, fz_iccprofile *profile) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->init_profile(ctx->cmm_instance, profile); }
DoS
0
void fz_cmm_init_profile(fz_context *ctx, fz_iccprofile *profile) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->init_profile(ctx->cmm_instance, profile); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
252
fz_cmm_transform_color(fz_context *ctx, fz_icclink *link, unsigned short *dst, const unsigned short *src) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->transform_color(ctx->cmm_instance, link, dst, src); }
DoS
0
fz_cmm_transform_color(fz_context *ctx, fz_icclink *link, unsigned short *dst, const unsigned short *src) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->transform_color(ctx->cmm_instance, link, dst, src); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
253
fz_cmm_transform_pixmap(fz_context *ctx, fz_icclink *link, fz_pixmap *dst, fz_pixmap *src) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->transform_pixmap(ctx->cmm_instance, link, dst, src); }
DoS
0
fz_cmm_transform_pixmap(fz_context *ctx, fz_icclink *link, fz_pixmap *dst, fz_pixmap *src) { if (ctx && ctx->colorspace && ctx->colorspace->cmm && ctx->cmm_instance) ctx->colorspace->cmm->transform_pixmap(ctx->cmm_instance, link, dst, src); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
254
fz_cmp_link_key(fz_context *ctx, void *k0_, void *k1_) { fz_link_key *k0 = (fz_link_key *)k0_; fz_link_key *k1 = (fz_link_key *)k1_; return k0->proof == k1->proof && k0->src_extras == k1->src_extras && k0->dst_extras == k1->dst_extras && k0->copy_spots == k1->copy_spots && k0->depth == k1->depth && k0->ren...
DoS
0
fz_cmp_link_key(fz_context *ctx, void *k0_, void *k1_) { fz_link_key *k0 = (fz_link_key *)k0_; fz_link_key *k1 = (fz_link_key *)k1_; return k0->proof == k1->proof && k0->src_extras == k1->src_extras && k0->dst_extras == k1->dst_extras && k0->copy_spots == k1->copy_spots && k0->depth == k1->depth && k0->ren...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
255
fz_colorspace *fz_colorspace_base(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->get_base ? cs->get_base(cs) : NULL; }
DoS
0
fz_colorspace *fz_colorspace_base(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->get_base ? cs->get_base(cs) : NULL; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
256
const char *fz_colorspace_colorant(fz_context *ctx, const fz_colorspace *cs, int i) { if (!cs || i < 0 || i >= cs->n) fz_throw(ctx, FZ_ERROR_GENERIC, "Colorant out of range"); return cs->colorant[i]; }
DoS
0
const char *fz_colorspace_colorant(fz_context *ctx, const fz_colorspace *cs, int i) { if (!cs || i < 0 || i >= cs->n) fz_throw(ctx, FZ_ERROR_GENERIC, "Colorant out of range"); return cs->colorant[i]; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
257
int fz_colorspace_device_n_has_cmyk(fz_context *ctx, const fz_colorspace *cs) { return cs && (cs->flags & FZ_CS_HAS_CMYK); }
DoS
0
int fz_colorspace_device_n_has_cmyk(fz_context *ctx, const fz_colorspace *cs) { return cs && (cs->flags & FZ_CS_HAS_CMYK); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
258
int fz_colorspace_is_bgr(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_BGR; }
DoS
0
int fz_colorspace_is_bgr(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_BGR; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
259
int fz_colorspace_is_cal(fz_context *ctx, const fz_colorspace *cs) { return cs && (cs->flags & FZ_COLORSPACE_IS_CAL); }
DoS
0
int fz_colorspace_is_cal(fz_context *ctx, const fz_colorspace *cs) { return cs && (cs->flags & FZ_COLORSPACE_IS_CAL); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
260
int fz_colorspace_is_cmyk(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_CMYK; }
DoS
0
int fz_colorspace_is_cmyk(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_CMYK; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
261
int fz_colorspace_is_device_gray(fz_context *ctx, const fz_colorspace *cs) { return fz_colorspace_is_device(ctx, cs) && fz_colorspace_is_gray(ctx, cs); }
DoS
0
int fz_colorspace_is_device_gray(fz_context *ctx, const fz_colorspace *cs) { return fz_colorspace_is_device(ctx, cs) && fz_colorspace_is_gray(ctx, cs); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
262
int fz_colorspace_is_device_n(fz_context *ctx, const fz_colorspace *cs) { return cs && (cs->type == FZ_COLORSPACE_SEPARATION); }
DoS
0
int fz_colorspace_is_device_n(fz_context *ctx, const fz_colorspace *cs) { return cs && (cs->type == FZ_COLORSPACE_SEPARATION); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
263
int fz_colorspace_is_gray(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_GRAY; }
DoS
0
int fz_colorspace_is_gray(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_GRAY; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
264
int fz_colorspace_is_icc(fz_context *ctx, const fz_colorspace *cs) { return cs && (cs->flags & FZ_COLORSPACE_IS_ICC); }
DoS
0
int fz_colorspace_is_icc(fz_context *ctx, const fz_colorspace *cs) { return cs && (cs->flags & FZ_COLORSPACE_IS_ICC); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
265
int fz_colorspace_is_lab(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_LAB; }
DoS
0
int fz_colorspace_is_lab(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_LAB; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
266
int fz_colorspace_is_lab_icc(fz_context *ctx, const fz_colorspace *cs) { return fz_colorspace_is_lab(ctx, cs) && fz_colorspace_is_icc(ctx, cs); }
DoS
0
int fz_colorspace_is_lab_icc(fz_context *ctx, const fz_colorspace *cs) { return fz_colorspace_is_lab(ctx, cs) && fz_colorspace_is_icc(ctx, cs); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
267
int fz_colorspace_is_rgb(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_RGB; }
DoS
0
int fz_colorspace_is_rgb(fz_context *ctx, const fz_colorspace *cs) { return cs && cs->type == FZ_COLORSPACE_RGB; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
268
int fz_colorspace_n(fz_context *ctx, const fz_colorspace *cs) { return cs ? cs->n : 0; }
DoS
0
int fz_colorspace_n(fz_context *ctx, const fz_colorspace *cs) { return cs ? cs->n : 0; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
269
const char *fz_colorspace_name(fz_context *ctx, const fz_colorspace *cs) { return cs ? cs->name : ""; }
DoS
0
const char *fz_colorspace_name(fz_context *ctx, const fz_colorspace *cs) { return cs ? cs->name : ""; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
270
void fz_colorspace_name_colorant(fz_context *ctx, fz_colorspace *cs, int i, const char *name) { if (!cs) return; if (i < 0 || i >= cs->n) fz_throw(ctx, FZ_ERROR_GENERIC, "Attempt to name out of range colorant"); fz_free(ctx, cs->colorant[i]); cs->colorant[i] = NULL; if (name) { cs->colorant[i] = fz_strdup...
DoS
0
void fz_colorspace_name_colorant(fz_context *ctx, fz_colorspace *cs, int i, const char *name) { if (!cs) return; if (i < 0 || i >= cs->n) fz_throw(ctx, FZ_ERROR_GENERIC, "Attempt to name out of range colorant"); fz_free(ctx, cs->colorant[i]); cs->colorant[i] = NULL; if (name) { cs->colorant[i] = fz_strdup...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
271
fz_colorspace_type(fz_context *ctx, fz_colorspace *cs) { return cs ? cs->type : FZ_COLORSPACE_NONE; }
DoS
0
fz_colorspace_type(fz_context *ctx, fz_colorspace *cs) { return cs ? cs->type : FZ_COLORSPACE_NONE; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
272
fz_default_cmyk(fz_context *ctx, const fz_default_colorspaces *default_cs) { if (default_cs) return default_cs->cmyk; else return fz_device_cmyk(ctx); }
DoS
0
fz_default_cmyk(fz_context *ctx, const fz_default_colorspaces *default_cs) { if (default_cs) return default_cs->cmyk; else return fz_device_cmyk(ctx); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
273
fz_default_color_params(fz_context *ctx) { return default_color_params; }
DoS
0
fz_default_color_params(fz_context *ctx) { return default_color_params; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
274
fz_default_gray(fz_context *ctx, const fz_default_colorspaces *default_cs) { if (default_cs) return default_cs->gray; else return fz_device_gray(ctx); }
DoS
0
fz_default_gray(fz_context *ctx, const fz_default_colorspaces *default_cs) { if (default_cs) return default_cs->gray; else return fz_device_gray(ctx); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
275
fz_default_rgb(fz_context *ctx, const fz_default_colorspaces *default_cs) { if (default_cs) return default_cs->rgb; else return fz_device_rgb(ctx); }
DoS
0
fz_default_rgb(fz_context *ctx, const fz_default_colorspaces *default_cs) { if (default_cs) return default_cs->rgb; else return fz_device_rgb(ctx); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
276
fz_device_bgr(fz_context *ctx) { return ctx->colorspace->bgr; }
DoS
0
fz_device_bgr(fz_context *ctx) { return ctx->colorspace->bgr; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
277
fz_device_cmyk(fz_context *ctx) { return ctx->colorspace->cmyk; }
DoS
0
fz_device_cmyk(fz_context *ctx) { return ctx->colorspace->cmyk; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
278
fz_drop_cmm_context(fz_context *ctx) { fz_cmm_drop_instance(ctx); ctx->cmm_instance = NULL; }
DoS
0
fz_drop_cmm_context(fz_context *ctx) { fz_cmm_drop_instance(ctx); ctx->cmm_instance = NULL; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
279
fz_drop_color_converter(fz_context *ctx, fz_color_converter *cc) { fz_icclink *link = (fz_icclink *)cc->link; if (link) fz_drop_icclink(ctx, link); cc->link = NULL; }
DoS
0
fz_drop_color_converter(fz_context *ctx, fz_color_converter *cc) { fz_icclink *link = (fz_icclink *)cc->link; if (link) fz_drop_icclink(ctx, link); cc->link = NULL; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
280
fz_drop_colorspace(fz_context *ctx, fz_colorspace *cs) { fz_drop_key_storable(ctx, &cs->key_storable); }
DoS
0
fz_drop_colorspace(fz_context *ctx, fz_colorspace *cs) { fz_drop_key_storable(ctx, &cs->key_storable); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
281
fz_drop_colorspace_imp(fz_context *ctx, fz_storable *cs_) { fz_colorspace *cs = (fz_colorspace *)cs_; int i; if (cs->free_data && cs->data) cs->free_data(ctx, cs); for (i = 0; i < FZ_MAX_COLORS; i++) fz_free(ctx, cs->colorant[i]); fz_free(ctx, cs); }
DoS
0
fz_drop_colorspace_imp(fz_context *ctx, fz_storable *cs_) { fz_colorspace *cs = (fz_colorspace *)cs_; int i; if (cs->free_data && cs->data) cs->free_data(ctx, cs); for (i = 0; i < FZ_MAX_COLORS; i++) fz_free(ctx, cs->colorant[i]); fz_free(ctx, cs); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
282
fz_drop_default_colorspaces(fz_context *ctx, fz_default_colorspaces *default_cs) { if (fz_drop_imp(ctx, default_cs, &default_cs->refs)) { fz_drop_colorspace(ctx, default_cs->gray); fz_drop_colorspace(ctx, default_cs->rgb); fz_drop_colorspace(ctx, default_cs->cmyk); fz_drop_colorspace(ctx, default_cs->oi); f...
DoS
0
fz_drop_default_colorspaces(fz_context *ctx, fz_default_colorspaces *default_cs) { if (fz_drop_imp(ctx, default_cs, &default_cs->refs)) { fz_drop_colorspace(ctx, default_cs->gray); fz_drop_colorspace(ctx, default_cs->rgb); fz_drop_colorspace(ctx, default_cs->cmyk); fz_drop_colorspace(ctx, default_cs->oi); f...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
283
fz_drop_icclink(fz_context *ctx, fz_icclink *link) { fz_drop_storable(ctx, &link->storable); }
DoS
0
fz_drop_icclink(fz_context *ctx, fz_icclink *link) { fz_drop_storable(ctx, &link->storable); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
284
fz_drop_link_imp(fz_context *ctx, fz_storable *storable) { fz_icclink *link = (fz_icclink *)storable; fz_cmm_fin_link(ctx, link); fz_free(ctx, link); }
DoS
0
fz_drop_link_imp(fz_context *ctx, fz_storable *storable) { fz_icclink *link = (fz_icclink *)storable; fz_cmm_fin_link(ctx, link); fz_free(ctx, link); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
285
fz_expand_indexed_pixmap(fz_context *ctx, const fz_pixmap *src, int alpha) { struct indexed *idx; fz_pixmap *dst; const unsigned char *s; unsigned char *d; int y, x, k, n, high; unsigned char *lookup; fz_irect bbox; int s_line_inc, d_line_inc; assert(src->colorspace->to_ccs == indexed_to_rgb || src->colorspac...
DoS
0
fz_expand_indexed_pixmap(fz_context *ctx, const fz_pixmap *src, int alpha) { struct indexed *idx; fz_pixmap *dst; const unsigned char *s; unsigned char *d; int y, x, k, n, high; unsigned char *lookup; fz_irect bbox; int s_line_inc, d_line_inc; assert(src->colorspace->to_ccs == indexed_to_rgb || src->colorspac...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
286
void fz_find_color_converter(fz_context *ctx, fz_color_converter *cc, const fz_colorspace *is, const fz_colorspace *ds, const fz_colorspace *ss, const fz_color_params *params) { if (ds == NULL) ds = fz_device_gray(ctx); if (ss == NULL) ss = fz_device_gray(ctx); cc->ds = ds; cc->ss = ss; cc->is = is; cc->link ...
DoS
0
void fz_find_color_converter(fz_context *ctx, fz_color_converter *cc, const fz_colorspace *is, const fz_colorspace *ds, const fz_colorspace *ss, const fz_color_params *params) { if (ds == NULL) ds = fz_device_gray(ctx); if (ss == NULL) ss = fz_device_gray(ctx); cc->ds = ds; cc->ss = ss; cc->is = is; cc->link ...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
287
const fz_cmm_engine *fz_get_cmm_engine(fz_context *ctx) { return ctx->colorspace ? ctx->colorspace->cmm : NULL; }
DoS
0
const fz_cmm_engine *fz_get_cmm_engine(fz_context *ctx) { return ctx->colorspace ? ctx->colorspace->cmm : NULL; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
288
fz_get_icc_link(fz_context *ctx, const fz_colorspace *dst, int dst_extras, const fz_colorspace *src, int src_extras, const fz_colorspace *prf, const fz_color_params *rend, int num_bytes, int copy_spots, int *src_n) { fz_icclink *link = NULL; fz_iccprofile *src_icc = NULL; fz_iccprofile *dst_icc = dst->data; fz_iccp...
DoS
0
fz_get_icc_link(fz_context *ctx, const fz_colorspace *dst, int dst_extras, const fz_colorspace *src, int src_extras, const fz_colorspace *prf, const fz_color_params *rend, int num_bytes, int copy_spots, int *src_n) { fz_icclink *link = NULL; fz_iccprofile *src_icc = NULL; fz_iccprofile *dst_icc = dst->data; fz_iccp...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
289
fz_icc_data_from_icc_colorspace(fz_context *ctx, const fz_colorspace *cs) { fz_iccprofile *profile; if (cs == NULL || !fz_colorspace_is_icc(ctx, cs)) return NULL; profile = cs->data; if (!profile) return NULL; return profile->buffer; }
DoS
0
fz_icc_data_from_icc_colorspace(fz_context *ctx, const fz_colorspace *cs) { fz_iccprofile *profile; if (cs == NULL || !fz_colorspace_is_icc(ctx, cs)) return NULL; profile = cs->data; if (!profile) return NULL; return profile->buffer; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
290
fz_icc_from_cal(fz_context *ctx, const fz_colorspace *cs) { fz_cal_colorspace *cal_data = cs->data; fz_iccprofile *profile; if (cal_data->profile != NULL) return cal_data->profile; profile = fz_malloc_struct(ctx, fz_iccprofile); fz_try(ctx) { profile->buffer = fz_new_icc_data_from_cal_colorspace(ctx, cal_da...
DoS
0
fz_icc_from_cal(fz_context *ctx, const fz_colorspace *cs) { fz_cal_colorspace *cal_data = cs->data; fz_iccprofile *profile; if (cal_data->profile != NULL) return cal_data->profile; profile = fz_malloc_struct(ctx, fz_iccprofile); fz_try(ctx) { profile->buffer = fz_new_icc_data_from_cal_colorspace(ctx, cal_da...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
291
fz_indexed_colorspace_palette(fz_context *ctx, fz_colorspace *cs, int *high) { struct indexed *idx = cs->data; if (!fz_colorspace_is_indexed(ctx, cs)) fz_throw(ctx, FZ_ERROR_GENERIC, "colorspace not indexed"); *high = idx->high; return idx->lookup; }
DoS
0
fz_indexed_colorspace_palette(fz_context *ctx, fz_colorspace *cs, int *high) { struct indexed *idx = cs->data; if (!fz_colorspace_is_indexed(ctx, cs)) fz_throw(ctx, FZ_ERROR_GENERIC, "colorspace not indexed"); *high = idx->high; return idx->lookup; }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
292
fz_keep_colorspace(fz_context *ctx, fz_colorspace *cs) { return fz_keep_key_storable(ctx, &cs->key_storable); }
DoS
0
fz_keep_colorspace(fz_context *ctx, fz_colorspace *cs) { return fz_keep_key_storable(ctx, &cs->key_storable); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
293
fz_keep_colorspace_context(fz_context *ctx) { if (!ctx) return NULL; return fz_keep_imp(ctx, ctx->colorspace, &ctx->colorspace->ctx_refs); }
DoS
0
fz_keep_colorspace_context(fz_context *ctx) { if (!ctx) return NULL; return fz_keep_imp(ctx, ctx->colorspace, &ctx->colorspace->ctx_refs); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
294
fz_keep_colorspace_store_key(fz_context *ctx, fz_colorspace *cs) { return fz_keep_key_storable_key(ctx, &cs->key_storable); }
DoS
0
fz_keep_colorspace_store_key(fz_context *ctx, fz_colorspace *cs) { return fz_keep_key_storable_key(ctx, &cs->key_storable); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
295
fz_keep_link_key(fz_context *ctx, void *key_) { fz_link_key *key = (fz_link_key *)key_; return fz_keep_imp(ctx, key, &key->refs); }
DoS
0
fz_keep_link_key(fz_context *ctx, void *key_) { fz_link_key *key = (fz_link_key *)key_; return fz_keep_imp(ctx, key, &key->refs); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
296
fz_pixmap_converter *fz_lookup_pixmap_converter(fz_context *ctx, fz_colorspace *ds, fz_colorspace *ss) { if (ds == NULL) return fast_any_to_alpha; if (ss == default_gray) { if (ds == default_rgb) return fast_gray_to_rgb; else if (ds == default_bgr) return fast_gray_to_rgb; /* bgr == rgb here */ else if (ds ...
DoS
0
fz_pixmap_converter *fz_lookup_pixmap_converter(fz_context *ctx, fz_colorspace *ds, fz_colorspace *ss) { if (ds == NULL) return fast_any_to_alpha; if (ss == default_gray) { if (ds == default_rgb) return fast_gray_to_rgb; else if (ds == default_bgr) return fast_gray_to_rgb; /* bgr == rgb here */ else if (ds ...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
297
fz_make_hash_link_key(fz_context *ctx, fz_store_hash *hash, void *key_) { fz_link_key *key = (fz_link_key *)key_; memcpy(hash->u.link.dst_md5, key->dst_md5, 16); memcpy(hash->u.link.src_md5, key->src_md5, 16); hash->u.link.ri = key->rend.ri; hash->u.link.bp = key->rend.bp; hash->u.link.src_extras = key->src_extra...
DoS
0
fz_make_hash_link_key(fz_context *ctx, fz_store_hash *hash, void *key_) { fz_link_key *key = (fz_link_key *)key_; memcpy(hash->u.link.dst_md5, key->dst_md5, 16); memcpy(hash->u.link.src_md5, key->src_md5, 16); hash->u.link.ri = key->rend.ri; hash->u.link.bp = key->rend.bp; hash->u.link.src_extras = key->src_extra...
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
298
fz_md5_icc(fz_context *ctx, fz_iccprofile *profile) { if (profile) fz_md5_buffer(ctx, profile->buffer, profile->md5); }
DoS
0
fz_md5_icc(fz_context *ctx, fz_iccprofile *profile) { if (profile) fz_md5_buffer(ctx, profile->buffer, profile->md5); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null
299
fz_new_cmm_context(fz_context *ctx) { ctx->cmm_instance = fz_cmm_new_instance(ctx); }
DoS
0
fz_new_cmm_context(fz_context *ctx) { ctx->cmm_instance = fz_cmm_new_instance(ctx); }
@@ -3663,6 +3663,7 @@ void fz_init_cached_color_converter(fz_context *ctx, fz_color_converter *cc, fz_ fz_drop_color_converter(ctx, &cached->base); fz_drop_hash_table(ctx, cached->hash); fz_free(ctx, cached); + cc->opaque = NULL; fz_rethrow(c...
CWE-20
null
null