idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
4,200
static inline struct timespec pch_timestamp (bool which) { return p_timestamp[which]; }
null
0
static inline struct timespec pch_timestamp (bool which) { return p_timestamp[which]; }
@@ -37,6 +37,7 @@ bool pch_write_line (lin, FILE *); bool there_is_another_patch (bool, mode_t *); char *pfetch (lin) _GL_ATTRIBUTE_PURE; char pch_char (lin) _GL_ATTRIBUTE_PURE; +bool symlink_target_is_valid (char const *, char const *); int another_hunk (enum diff, bool); int pch_says_nonexistent (bool) _GL_ATTRI...
CWE-59
null
null
4,201
hb_buffer_get_direction (hb_buffer_t *buffer) { return buffer->direction; }
DoS Exec Code
0
hb_buffer_get_direction (hb_buffer_t *buffer) { return buffer->direction; }
@@ -54,23 +54,23 @@ static hb_buffer_t _hb_buffer_nil = { * switches info and out_info. */ -/* XXX err handling */ /* Internal API */ -static void +static hb_bool_t hb_buffer_ensure_separate (hb_buffer_t *buffer, unsigned int size) { - hb_buffer_ensure (buffer, size); + if (unlikely (!hb_buffer_ensure (b...
null
null
null
4,202
hb_buffer_get_script (hb_buffer_t *buffer) { return buffer->script; }
DoS Exec Code
0
hb_buffer_get_script (hb_buffer_t *buffer) { return buffer->script; }
@@ -54,23 +54,23 @@ static hb_buffer_t _hb_buffer_nil = { * switches info and out_info. */ -/* XXX err handling */ /* Internal API */ -static void +static hb_bool_t hb_buffer_ensure_separate (hb_buffer_t *buffer, unsigned int size) { - hb_buffer_ensure (buffer, size); + if (unlikely (!hb_buffer_ensure (b...
null
null
null
4,203
hb_buffer_get_unicode_funcs (hb_buffer_t *buffer) { return buffer->unicode; }
DoS Exec Code
0
hb_buffer_get_unicode_funcs (hb_buffer_t *buffer) { return buffer->unicode; }
@@ -54,23 +54,23 @@ static hb_buffer_t _hb_buffer_nil = { * switches info and out_info. */ -/* XXX err handling */ /* Internal API */ -static void +static hb_bool_t hb_buffer_ensure_separate (hb_buffer_t *buffer, unsigned int size) { - hb_buffer_ensure (buffer, size); + if (unlikely (!hb_buffer_ensure (b...
null
null
null
4,204
hb_buffer_reference (hb_buffer_t *buffer) { HB_OBJECT_DO_REFERENCE (buffer); }
DoS Exec Code
0
hb_buffer_reference (hb_buffer_t *buffer) { HB_OBJECT_DO_REFERENCE (buffer); }
@@ -54,23 +54,23 @@ static hb_buffer_t _hb_buffer_nil = { * switches info and out_info. */ -/* XXX err handling */ /* Internal API */ -static void +static hb_bool_t hb_buffer_ensure_separate (hb_buffer_t *buffer, unsigned int size) { - hb_buffer_ensure (buffer, size); + if (unlikely (!hb_buffer_ensure (b...
null
null
null
4,205
hb_buffer_set_direction (hb_buffer_t *buffer, hb_direction_t direction) { buffer->direction = direction; }
DoS Exec Code
0
hb_buffer_set_direction (hb_buffer_t *buffer, hb_direction_t direction) { buffer->direction = direction; }
@@ -54,23 +54,23 @@ static hb_buffer_t _hb_buffer_nil = { * switches info and out_info. */ -/* XXX err handling */ /* Internal API */ -static void +static hb_bool_t hb_buffer_ensure_separate (hb_buffer_t *buffer, unsigned int size) { - hb_buffer_ensure (buffer, size); + if (unlikely (!hb_buffer_ensure (b...
null
null
null
4,206
hb_buffer_set_script (hb_buffer_t *buffer, hb_script_t script) { buffer->script = script; }
DoS Exec Code
0
hb_buffer_set_script (hb_buffer_t *buffer, hb_script_t script) { buffer->script = script; }
@@ -54,23 +54,23 @@ static hb_buffer_t _hb_buffer_nil = { * switches info and out_info. */ -/* XXX err handling */ /* Internal API */ -static void +static hb_bool_t hb_buffer_ensure_separate (hb_buffer_t *buffer, unsigned int size) { - hb_buffer_ensure (buffer, size); + if (unlikely (!hb_buffer_ensure (b...
null
null
null
4,207
hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, hb_unicode_funcs_t *unicode) { if (!unicode) unicode = &_hb_unicode_funcs_nil; hb_unicode_funcs_reference (unicode); hb_unicode_funcs_destroy (buffer->unicode); buffer->unicode = unicode; }
DoS Exec Code
0
hb_buffer_set_unicode_funcs (hb_buffer_t *buffer, hb_unicode_funcs_t *unicode) { if (!unicode) unicode = &_hb_unicode_funcs_nil; hb_unicode_funcs_reference (unicode); hb_unicode_funcs_destroy (buffer->unicode); buffer->unicode = unicode; }
@@ -54,23 +54,23 @@ static hb_buffer_t _hb_buffer_nil = { * switches info and out_info. */ -/* XXX err handling */ /* Internal API */ -static void +static hb_bool_t hb_buffer_ensure_separate (hb_buffer_t *buffer, unsigned int size) { - hb_buffer_ensure (buffer, size); + if (unlikely (!hb_buffer_ensure (b...
null
null
null
4,208
check_sparse_region (struct tar_sparse_file *file, off_t beg, off_t end) { if (!lseek_or_error (file, beg)) return false; while (beg < end) { size_t bytes_read; size_t rdsize = BLOCKSIZE < end - beg ? BLOCKSIZE : end - beg; char diff_buffer[BLOCKSIZE]; bytes_read = safe_read (file-...
null
0
check_sparse_region (struct tar_sparse_file *file, off_t beg, off_t end) { if (!lseek_or_error (file, beg)) return false; while (beg < end) { size_t bytes_read; size_t rdsize = BLOCKSIZE < end - beg ? BLOCKSIZE : end - beg; char diff_buffer[BLOCKSIZE]; bytes_read = safe_read (file-...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,209
decode_num (uintmax_t *num, char const *arg, uintmax_t maxval) { uintmax_t u; char *arg_lim; if (!ISDIGIT (*arg)) return false; errno = 0; u = strtoumax (arg, &arg_lim, 10); if (! (u <= maxval && errno != ERANGE) || *arg_lim) return false; *num = u; return true; }
null
0
decode_num (uintmax_t *num, char const *arg, uintmax_t maxval) { uintmax_t u; char *arg_lim; if (!ISDIGIT (*arg)) return false; errno = 0; u = strtoumax (arg, &arg_lim, 10); if (! (u <= maxval && errno != ERANGE) || *arg_lim) return false; *num = u; return true; }
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,210
oldgnu_add_sparse (struct tar_sparse_file *file, struct sparse *s) { struct sp_array sp; if (s->numbytes[0] == '\0') return add_finish; sp.offset = OFF_FROM_HEADER (s->offset); sp.numbytes = OFF_FROM_HEADER (s->numbytes); if (sp.offset < 0 || sp.numbytes < 0 || INT_ADD_OVERFLOW (sp.offset, sp.numby...
null
0
oldgnu_add_sparse (struct tar_sparse_file *file, struct sparse *s) { struct sp_array sp; if (s->numbytes[0] == '\0') return add_finish; sp.offset = OFF_FROM_HEADER (s->offset); sp.numbytes = OFF_FROM_HEADER (s->numbytes); if (sp.offset < 0 || sp.numbytes < 0 || INT_ADD_OVERFLOW (sp.offset, sp.numby...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,211
oldgnu_dump_header (struct tar_sparse_file *file) { off_t block_ordinal = current_block_ordinal (); union block *blk; size_t i; blk = start_header (file->stat_info); blk->header.typeflag = GNUTYPE_SPARSE; if (file->stat_info->sparse_map_avail > SPARSES_IN_OLDGNU_HEADER) blk->oldgnu_header.isextended = ...
null
0
oldgnu_dump_header (struct tar_sparse_file *file) { off_t block_ordinal = current_block_ordinal (); union block *blk; size_t i; blk = start_header (file->stat_info); blk->header.typeflag = GNUTYPE_SPARSE; if (file->stat_info->sparse_map_avail > SPARSES_IN_OLDGNU_HEADER) blk->oldgnu_header.isextended = ...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,212
oldgnu_fixup_header (struct tar_sparse_file *file) { /* NOTE! st_size was initialized from the header which actually contains archived size. The following fixes it */ off_t realsize = OFF_FROM_HEADER (current_header->oldgnu_header.realsize); file->stat_info->archive_file_size = file->stat_info->stat.st_size;...
null
0
oldgnu_fixup_header (struct tar_sparse_file *file) { /* NOTE! st_size was initialized from the header which actually contains archived size. The following fixes it */ off_t realsize = OFF_FROM_HEADER (current_header->oldgnu_header.realsize); file->stat_info->archive_file_size = file->stat_info->stat.st_size;...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,213
oldgnu_get_sparse_info (struct tar_sparse_file *file) { size_t i; union block *h = current_header; int ext_p; enum oldgnu_add_status rc; file->stat_info->sparse_map_avail = 0; for (i = 0; i < SPARSES_IN_OLDGNU_HEADER; i++) { rc = oldgnu_add_sparse (file, &h->oldgnu_header.sp[i]); if (rc != ...
null
0
oldgnu_get_sparse_info (struct tar_sparse_file *file) { size_t i; union block *h = current_header; int ext_p; enum oldgnu_add_status rc; file->stat_info->sparse_map_avail = 0; for (i = 0; i < SPARSES_IN_OLDGNU_HEADER; i++) { rc = oldgnu_add_sparse (file, &h->oldgnu_header.sp[i]); if (rc != ...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,214
oldgnu_store_sparse_info (struct tar_sparse_file *file, size_t *pindex, struct sparse *sp, size_t sparse_size) { for (; *pindex < file->stat_info->sparse_map_avail && sparse_size > 0; sparse_size--, sp++, ++*pindex) { OFF_TO_CHARS (file->stat_info->sparse_map[*pindex].offset, sp->offset); ...
null
0
oldgnu_store_sparse_info (struct tar_sparse_file *file, size_t *pindex, struct sparse *sp, size_t sparse_size) { for (; *pindex < file->stat_info->sparse_map_avail && sparse_size > 0; sparse_size--, sp++, ++*pindex) { OFF_TO_CHARS (file->stat_info->sparse_map[*pindex].offset, sp->offset); ...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,215
pax_dump_header (struct tar_sparse_file *file) { file->stat_info->sparse_major = tar_sparse_major; file->stat_info->sparse_minor = tar_sparse_minor; return (file->stat_info->sparse_major == 0) ? pax_dump_header_0 (file) : pax_dump_header_1 (file); }
null
0
pax_dump_header (struct tar_sparse_file *file) { file->stat_info->sparse_major = tar_sparse_major; file->stat_info->sparse_minor = tar_sparse_minor; return (file->stat_info->sparse_major == 0) ? pax_dump_header_0 (file) : pax_dump_header_1 (file); }
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,216
pax_dump_header_1 (struct tar_sparse_file *file) { off_t block_ordinal = current_block_ordinal (); union block *blk; char *p, *q; size_t i; char nbuf[UINTMAX_STRSIZE_BOUND]; off_t size = 0; struct sp_array *map = file->stat_info->sparse_map; char *save_file_name = file->stat_info->file_name; #define CO...
null
0
pax_dump_header_1 (struct tar_sparse_file *file) { off_t block_ordinal = current_block_ordinal (); union block *blk; char *p, *q; size_t i; char nbuf[UINTMAX_STRSIZE_BOUND]; off_t size = 0; struct sp_array *map = file->stat_info->sparse_map; char *save_file_name = file->stat_info->file_name; #define CO...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,217
pax_sparse_member_p (struct tar_sparse_file *file) { return file->stat_info->sparse_map_avail > 0 || file->stat_info->sparse_major > 0; }
null
0
pax_sparse_member_p (struct tar_sparse_file *file) { return file->stat_info->sparse_map_avail > 0 || file->stat_info->sparse_major > 0; }
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,218
pax_start_header (struct tar_stat_info *st) { off_t realsize = st->stat.st_size; union block *blk; st->stat.st_size = st->archive_file_size; blk = start_header (st); st->stat.st_size = realsize; return blk; }
null
0
pax_start_header (struct tar_stat_info *st) { off_t realsize = st->stat.st_size; union block *blk; st->stat.st_size = st->archive_file_size; blk = start_header (st); st->stat.st_size = realsize; return blk; }
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,219
sparse_diff_file (int fd, struct tar_stat_info *st) { bool rc = true; struct tar_sparse_file file; size_t i; off_t offset = 0; if (!tar_sparse_init (&file)) return dump_status_not_implemented; file.stat_info = st; file.fd = fd; file.seekable = true; /* File *must* be seekable for compare to work *...
null
0
sparse_diff_file (int fd, struct tar_stat_info *st) { bool rc = true; struct tar_sparse_file file; size_t i; off_t offset = 0; if (!tar_sparse_init (&file)) return dump_status_not_implemented; file.stat_info = st; file.fd = fd; file.seekable = true; /* File *must* be seekable for compare to work *...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,220
sparse_extract_region (struct tar_sparse_file *file, size_t i) { off_t write_size; if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset)) return false; write_size = file->stat_info->sparse_map[i].numbytes; if (write_size == 0) { /* Last block of the file is a hole */ if (file-...
null
0
sparse_extract_region (struct tar_sparse_file *file, size_t i) { off_t write_size; if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset)) return false; write_size = file->stat_info->sparse_map[i].numbytes; if (write_size == 0) { /* Last block of the file is a hole */ if (file-...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,221
star_fixup_header (struct tar_sparse_file *file) { /* NOTE! st_size was initialized from the header which actually contains archived size. The following fixes it */ off_t realsize = OFF_FROM_HEADER (current_header->star_in_header.realsize); file->stat_info->archive_file_size = file->stat_info->stat.st_size; ...
null
0
star_fixup_header (struct tar_sparse_file *file) { /* NOTE! st_size was initialized from the header which actually contains archived size. The following fixes it */ off_t realsize = OFF_FROM_HEADER (current_header->star_in_header.realsize); file->stat_info->archive_file_size = file->stat_info->stat.st_size; ...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,222
star_get_sparse_info (struct tar_sparse_file *file) { size_t i; union block *h = current_header; int ext_p; enum oldgnu_add_status rc = add_ok; file->stat_info->sparse_map_avail = 0; if (h->star_in_header.prefix[0] == '\0' && h->star_in_header.sp[0].offset[10] != '\0') { /* Old star format...
null
0
star_get_sparse_info (struct tar_sparse_file *file) { size_t i; union block *h = current_header; int ext_p; enum oldgnu_add_status rc = add_ok; file->stat_info->sparse_map_avail = 0; if (h->star_in_header.prefix[0] == '\0' && h->star_in_header.sp[0].offset[10] != '\0') { /* Old star format...
@@ -1267,6 +1267,8 @@ pax_decode_header (struct tar_sparse_file *file) { \ set_next_block_after (b); \ b = find_next_block (); \ + if (!b) ...
CWE-476
null
null
4,223
alloc_trace_space(const gs_ref_memory_t *imem) { return imem->space + (imem->stable_memory == (const gs_memory_t *)imem); }
DoS Overflow
0
alloc_trace_space(const gs_ref_memory_t *imem) { return imem->space + (imem->stable_memory == (const gs_memory_t *)imem); }
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,224
broken_splay() { dlprintf("Broken splay tree!\n"); }
DoS Overflow
0
broken_splay() { dlprintf("Broken splay tree!\n"); }
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,225
clump_splay_app(clump_t *root, gs_ref_memory_t *imem, splay_app_result_t (*fn)(clump_t *, void *), void *arg) { clump_t *step_to; clump_t *cp = root; int from = SPLAY_FROM_ABOVE; splay_app_result_t res; SANITY_CHECK(cp); while (cp) { if (from == SPLAY_FROM_ABOVE) { ...
DoS Overflow
0
clump_splay_app(clump_t *root, gs_ref_memory_t *imem, splay_app_result_t (*fn)(clump_t *, void *), void *arg) { clump_t *step_to; clump_t *cp = root; int from = SPLAY_FROM_ABOVE; splay_app_result_t res; SANITY_CHECK(cp); while (cp) { if (from == SPLAY_FROM_ABOVE) { ...
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,226
clump_splay_remove(clump_t *cp, gs_ref_memory_t *imem) { clump_t *replacement; if (cp->left == NULL) { /* At most one child - easy */ replacement = cp->right; } else if (cp->right == NULL) { /* Strictly one child - easy */ replacement = cp->left; } else ...
DoS Overflow
0
clump_splay_remove(clump_t *cp, gs_ref_memory_t *imem) { clump_t *replacement; if (cp->left == NULL) { /* At most one child - easy */ replacement = cp->right; } else if (cp->right == NULL) { /* Strictly one child - easy */ replacement = cp->left; } else ...
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,227
clump_splay_walk_bwd(clump_splay_walker *sw) { clump_t *cp = sw->cp; int from = sw->from; if (cp == NULL) return NULL; /* We step backwards through the tree, and stop when we arrive * at sw->end in a reverse in order manner (i.e. by moving from * the right). */ while (1) { ...
DoS Overflow
0
clump_splay_walk_bwd(clump_splay_walker *sw) { clump_t *cp = sw->cp; int from = sw->from; if (cp == NULL) return NULL; /* We step backwards through the tree, and stop when we arrive * at sw->end in a reverse in order manner (i.e. by moving from * the right). */ while (1) { ...
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,228
clump_splay_walk_bwd_init(clump_splay_walker *sw, const gs_ref_memory_t *mem) { clump_t *cp = mem->root; if (cp) { SANITY_CHECK(cp); sw->from = SPLAY_FROM_RIGHT; while (cp->right) { cp = cp->right; } } sw->cp = cp; sw->end = NULL; return ...
DoS Overflow
0
clump_splay_walk_bwd_init(clump_splay_walker *sw, const gs_ref_memory_t *mem) { clump_t *cp = mem->root; if (cp) { SANITY_CHECK(cp); sw->from = SPLAY_FROM_RIGHT; while (cp->right) { cp = cp->right; } } sw->cp = cp; sw->end = NULL; return ...
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,229
clump_splay_walk_fwd(clump_splay_walker *sw) { clump_t *cp = sw->cp; int from = sw->from; if (cp == NULL) return NULL; /* We step through the tree, and stop when we arrive * at sw->end in an in order manner (i.e. by moving from * the left). */ while (1) { if (from == ...
DoS Overflow
0
clump_splay_walk_fwd(clump_splay_walker *sw) { clump_t *cp = sw->cp; int from = sw->from; if (cp == NULL) return NULL; /* We step through the tree, and stop when we arrive * at sw->end in an in order manner (i.e. by moving from * the left). */ while (1) { if (from == ...
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,230
clump_splay_walk_init_mid(clump_splay_walker *sw, clump_t *cp) { sw->from = SPLAY_FROM_LEFT; sw->cp = cp; sw->end = cp; if (cp) { SANITY_CHECK_MID(cp); } return cp; }
DoS Overflow
0
clump_splay_walk_init_mid(clump_splay_walker *sw, clump_t *cp) { sw->from = SPLAY_FROM_LEFT; sw->cp = cp; sw->end = cp; if (cp) { SANITY_CHECK_MID(cp); } return cp; }
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,231
free_all_allocator(clump_t *cp, void *arg) { struct free_data *fd = (struct free_data *)arg; if (cp->cbase + sizeof(obj_header_t) != (byte *)fd->imem) return SPLAY_APP_CONTINUE; fd->allocator = cp; alloc_free_clump(cp, fd->imem); return SPLAY_APP_STOP; }
DoS Overflow
0
free_all_allocator(clump_t *cp, void *arg) { struct free_data *fd = (struct free_data *)arg; if (cp->cbase + sizeof(obj_header_t) != (byte *)fd->imem) return SPLAY_APP_CONTINUE; fd->allocator = cp; alloc_free_clump(cp, fd->imem); return SPLAY_APP_STOP; }
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,232
free_all_not_allocator(clump_t *cp, void *arg) { struct free_data *fd = (struct free_data *)arg; if (cp->cbase + sizeof(obj_header_t) != (byte *)fd->imem) alloc_free_clump(cp, fd->imem); else fd->allocator = cp; return SPLAY_APP_CONTINUE; }
DoS Overflow
0
free_all_not_allocator(clump_t *cp, void *arg) { struct free_data *fd = (struct free_data *)arg; if (cp->cbase + sizeof(obj_header_t) != (byte *)fd->imem) alloc_free_clump(cp, fd->imem); else fd->allocator = cp; return SPLAY_APP_CONTINUE; }
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,233
gs_id get_mem_hdr_id (void *ptr) { return (*((hdr_id_t *)((byte *)ptr) - HDR_ID_OFFSET)); }
DoS Overflow
0
gs_id get_mem_hdr_id (void *ptr) { return (*((hdr_id_t *)((byte *)ptr) - HDR_ID_OFFSET)); }
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,234
gs_memory_gc_status(const gs_ref_memory_t * mem, gs_memory_gc_status_t * pstat) { *pstat = mem->gc_status; }
DoS Overflow
0
gs_memory_gc_status(const gs_ref_memory_t * mem, gs_memory_gc_status_t * pstat) { *pstat = mem->gc_status; }
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,235
gs_memory_set_gc_status(gs_ref_memory_t * mem, const gs_memory_gc_status_t * pstat) { mem->gc_status = *pstat; ialloc_set_limit(mem); }
DoS Overflow
0
gs_memory_set_gc_status(gs_ref_memory_t * mem, const gs_memory_gc_status_t * pstat) { mem->gc_status = *pstat; ialloc_set_limit(mem); }
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,236
gs_memory_set_vm_reclaim(gs_ref_memory_t * mem, bool enabled) { gs_memory_gc_status_t stat; gs_ref_memory_t * stable = (gs_ref_memory_t *)mem->stable_memory; gs_memory_gc_status(mem, &stat); stat.enabled = enabled; gs_memory_set_gc_status(mem, &stat); gs_memory_gc_status(stable, &stat); sta...
DoS Overflow
0
gs_memory_set_vm_reclaim(gs_ref_memory_t * mem, bool enabled) { gs_memory_gc_status_t stat; gs_ref_memory_t * stable = (gs_ref_memory_t *)mem->stable_memory; gs_memory_gc_status(mem, &stat); stat.enabled = enabled; gs_memory_set_gc_status(mem, &stat); gs_memory_gc_status(stable, &stat); sta...
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,237
gs_memory_set_vm_threshold(gs_ref_memory_t * mem, long val) { gs_memory_gc_status_t stat; gs_ref_memory_t * stable = (gs_ref_memory_t *)mem->stable_memory; gs_memory_gc_status(mem, &stat); stat.vm_threshold = val; gs_memory_set_gc_status(mem, &stat); gs_memory_gc_status(stable, &stat); stat...
DoS Overflow
0
gs_memory_set_vm_threshold(gs_ref_memory_t * mem, long val) { gs_memory_gc_status_t stat; gs_ref_memory_t * stable = (gs_ref_memory_t *)mem->stable_memory; gs_memory_gc_status(mem, &stat); stat.vm_threshold = val; gs_memory_set_gc_status(mem, &stat); gs_memory_gc_status(stable, &stat); stat...
@@ -1248,19 +1248,32 @@ i_alloc_struct_immovable(gs_memory_t * mem, gs_memory_type_ptr_t pstype, alloc_trace("|+<.", imem, cname, pstype, size, obj); return obj; } + +static inline bool +alloc_array_check_size(ulong num_elements, ulong elt_size, ulong *lsize) +{ + int64_t s = (int64_t)num_elements * elt_s...
CWE-190
null
null
4,238
DOMElement* XMLHelper::appendChildElement(DOMElement* parentElement, DOMElement* childElement) { DOMDocument* parentDocument = parentElement->getOwnerDocument(); if (childElement->getOwnerDocument() != parentDocument) { childElement = static_cast<DOMElement*>(parentDocument->importNode(childElement, tru...
DoS
0
DOMElement* XMLHelper::appendChildElement(DOMElement* parentElement, DOMElement* childElement) { DOMDocument* parentDocument = parentElement->getOwnerDocument(); if (childElement->getOwnerDocument() != parentDocument) { childElement = static_cast<DOMElement*>(parentDocument->importNode(childElement, tru...
@@ -338,9 +338,11 @@ int XMLHelper::getAttrInt(const DOMElement* e, int defValue, const XMLCh* localN if (e) { const XMLCh* val = e->getAttributeNS(ns, localName); if (val && *val) { - int i = XMLString::parseInt(val); - if (i) - return i; + try { +...
CWE-189
null
null
4,239
static inline int s16(byte *p) { return (signed short)( (p[0] << 8) | p[1] ); }
DoS
0
static inline int s16(byte *p) { return (signed short)( (p[0] << 8) | p[1] ); }
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,240
static inline int u24(byte *p) { return (p[0] << 16) | (p[1] << 8) | p[2]; }
DoS
0
static inline int u24(byte *p) { return (p[0] << 16) | (p[1] << 8) | p[2]; }
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,241
static inline int u32(byte *p) { return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; }
DoS
0
static inline int u32(byte *p) { return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; }
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,242
xps_count_font_encodings(xps_font_t *font) { return font->cmapsubcount; }
DoS
0
xps_count_font_encodings(xps_font_t *font) { return font->cmapsubcount; }
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,243
xps_find_sfnt_table(xps_font_t *font, const char *name, int *lengthp) { int offset; int ntables; int i; if (font->length < 12) return -1; if (!memcmp(font->data, "ttcf", 4)) { int nfonts = u32(font->data + 8); if (font->subfontid < 0 || font->subfontid >= nfonts) ...
DoS
0
xps_find_sfnt_table(xps_font_t *font, const char *name, int *lengthp) { int offset; int ntables; int i; if (font->length < 12) return -1; if (!memcmp(font->data, "ttcf", 4)) { int nfonts = u32(font->data + 8); if (font->subfontid < 0 || font->subfontid >= nfonts) ...
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,244
xps_free_font(xps_context_t *ctx, xps_font_t *font) { if (font->font) { gs_font_finalize(ctx->memory, font->font); gs_free_object(ctx->memory, font->font, "font object"); } xps_free(ctx, font); }
DoS
0
xps_free_font(xps_context_t *ctx, xps_font_t *font) { if (font->font) { gs_font_finalize(ctx->memory, font->font); gs_free_object(ctx->memory, font->font, "font object"); } xps_free(ctx, font); }
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,245
xps_load_sfnt_cmap(xps_font_t *font) { byte *cmapdata; int offset, length; int nsubtables; offset = xps_find_sfnt_table(font, "cmap", &length); if (offset < 0 || length < 4) { gs_warn("cannot find cmap table"); return; } cmapdata = font->data + offset; nsubtables =...
DoS
0
xps_load_sfnt_cmap(xps_font_t *font) { byte *cmapdata; int offset, length; int nsubtables; offset = xps_find_sfnt_table(font, "cmap", &length); if (offset < 0 || length < 4) { gs_warn("cannot find cmap table"); return; } cmapdata = font->data + offset; nsubtables =...
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,246
xps_load_sfnt_name(xps_font_t *font, char *namep, const int buflen) { byte *namedata; int offset, length; /*int format;*/ int count, stringoffset; int found; int i, k; found = 0; strcpy(namep, "Unknown"); offset = xps_find_sfnt_table(font, "name", &length); if (offset < 0 || le...
DoS
0
xps_load_sfnt_name(xps_font_t *font, char *namep, const int buflen) { byte *namedata; int offset, length; /*int format;*/ int count, stringoffset; int found; int i, k; found = 0; strcpy(namep, "Unknown"); offset = xps_find_sfnt_table(font, "name", &length); if (offset < 0 || le...
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,247
xps_new_font(xps_context_t *ctx, byte *buf, int buflen, int index) { xps_font_t *font; int code; font = xps_alloc(ctx, sizeof(xps_font_t)); if (!font) { gs_throw(gs_error_VMerror, "out of memory"); return NULL; } font->data = buf; font->length = buflen; font->font =...
DoS
0
xps_new_font(xps_context_t *ctx, byte *buf, int buflen, int index) { xps_font_t *font; int code; font = xps_alloc(ctx, sizeof(xps_font_t)); if (!font) { gs_throw(gs_error_VMerror, "out of memory"); return NULL; } font->data = buf; font->length = buflen; font->font =...
@@ -379,9 +379,14 @@ xps_encode_font_char_imp(xps_font_t *font, int code) byte *startCount = endCount + segCount2 + 2; byte *idDelta = startCount + segCount2; byte *idRangeOffset = idDelta + segCount2; + byte *giddata; int i2; - for (i2 = 0; i2...
CWE-125
null
null
4,248
static void Compute_Funcs( EXEC_OP ) { if ( CUR.GS.freeVector.x == 0x4000 ) { CUR.func_freeProj = (TProject_Function)Project_x; CUR.F_dot_P = CUR.GS.projVector.x * 0x10000L; } else { if ( CUR.GS.freeVector.y == 0x4000 ) { CUR.func_freeProj = (TProject_Funct...
DoS
0
static void Compute_Funcs( EXEC_OP ) { if ( CUR.GS.freeVector.x == 0x4000 ) { CUR.func_freeProj = (TProject_Function)Project_x; CUR.F_dot_P = CUR.GS.projVector.x * 0x10000L; } else { if ( CUR.GS.freeVector.y == 0x4000 ) { CUR.func_freeProj = (TProject_Funct...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,249
static Bool Compute_Point_Displacement( EXEC_OPS PCoordinates x, PCoordinates y, PGlyph_Zone zone, Int* refp ) { TGlyph_Zone ...
DoS
0
static Bool Compute_Point_Displacement( EXEC_OPS PCoordinates x, PCoordinates y, PGlyph_Zone zone, Int* refp ) { TGlyph_Zone ...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,250
static void Compute_Round( EXEC_OPS Byte round_mode ) { switch ( round_mode ) { case TT_Round_Off: CUR.func_round = (TRound_Function)Round_None; break; case TT_Round_To_Grid: CUR.func_round = (TRound_Function)Round_To_Grid; break; case TT_Round_Up_To_Grid: CUR.f...
DoS
0
static void Compute_Round( EXEC_OPS Byte round_mode ) { switch ( round_mode ) { case TT_Round_Off: CUR.func_round = (TRound_Function)Round_None; break; case TT_Round_To_Grid: CUR.func_round = (TRound_Function)Round_To_Grid; break; case TT_Round_Up_To_Grid: CUR.f...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,251
static Int Current_Ppem( EXEC_OP ) { return MulDiv_Round( CUR.metrics.ppem, CURRENT_Ratio(), 0x10000 ); }
DoS
0
static Int Current_Ppem( EXEC_OP ) { return MulDiv_Round( CUR.metrics.ppem, CURRENT_Ratio(), 0x10000 ); }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,252
static Long Current_Ratio( EXEC_OP ) { if ( CUR.metrics.ratio ) return CUR.metrics.ratio; if ( CUR.GS.projVector.y == 0 ) CUR.metrics.ratio = CUR.metrics.x_ratio; else if ( CUR.GS.projVector.x == 0 ) CUR.metrics.ratio = CUR.metrics.y_ratio; else { Long x, y; x...
DoS
0
static Long Current_Ratio( EXEC_OP ) { if ( CUR.metrics.ratio ) return CUR.metrics.ratio; if ( CUR.GS.projVector.y == 0 ) CUR.metrics.ratio = CUR.metrics.x_ratio; else if ( CUR.GS.projVector.x == 0 ) CUR.metrics.ratio = CUR.metrics.y_ratio; else { Long x, y; x...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,253
static void Direct_Move( EXEC_OPS PGlyph_Zone zone, Int point, TT_F26Dot6 distance ) { TT_F26Dot6 v; v = CUR.GS.freeVector.x; if ( v != 0 ) { zone->cur_x[point] += MulDiv_Round( distance, ...
DoS
0
static void Direct_Move( EXEC_OPS PGlyph_Zone zone, Int point, TT_F26Dot6 distance ) { TT_F26Dot6 v; v = CUR.GS.freeVector.x; if ( v != 0 ) { zone->cur_x[point] += MulDiv_Round( distance, ...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,254
static void Direct_Move_X( EXEC_OPS PGlyph_Zone zone, Int point, TT_F26Dot6 distance ) { (void)exc; zone->cur_x[point] += distance; zone->touch[point] |= TT_Flag_Touched_X; }
DoS
0
static void Direct_Move_X( EXEC_OPS PGlyph_Zone zone, Int point, TT_F26Dot6 distance ) { (void)exc; zone->cur_x[point] += distance; zone->touch[point] |= TT_Flag_Touched_X; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,255
static TT_F26Dot6 Dual_Project( EXEC_OPS TT_F26Dot6 Vx, TT_F26Dot6 Vy ) { THROW_PATENTED; return 0; }
DoS
0
static TT_F26Dot6 Dual_Project( EXEC_OPS TT_F26Dot6 Vx, TT_F26Dot6 Vy ) { THROW_PATENTED; return 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,256
static TT_F26Dot6 FUnits_To_Pixels( EXEC_OPS Int distance ) { return MulDiv_Round( distance, CUR.metrics.scale1, CUR.metrics.scale2 ); }
DoS
0
static TT_F26Dot6 FUnits_To_Pixels( EXEC_OPS Int distance ) { return MulDiv_Round( distance, CUR.metrics.scale1, CUR.metrics.scale2 ); }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,257
static TT_F26Dot6 Free_Project( EXEC_OPS TT_F26Dot6 Vx, TT_F26Dot6 Vy ) { THROW_PATENTED; return 0; }
DoS
0
static TT_F26Dot6 Free_Project( EXEC_OPS TT_F26Dot6 Vx, TT_F26Dot6 Vy ) { THROW_PATENTED; return 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,258
static Short GetShortIns( EXEC_OP ) { /* Reading a byte stream so there is no endianess (DaveP) */ CUR.IP += 2; return ( CUR.code[CUR.IP-2] << 8) + CUR.code[CUR.IP-1]; }
DoS
0
static Short GetShortIns( EXEC_OP ) { /* Reading a byte stream so there is no endianess (DaveP) */ CUR.IP += 2; return ( CUR.code[CUR.IP-2] << 8) + CUR.code[CUR.IP-1]; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,259
static void Ins_AA( INS_ARG ) { (void)exc; (void)args; /* Intentional - no longer supported */ }
DoS
0
static void Ins_AA( INS_ARG ) { (void)exc; (void)args; /* Intentional - no longer supported */ }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,260
static void Ins_ABS( INS_ARG ) { (void)exc; args[0] = ABS( args[0] ); }
DoS
0
static void Ins_ABS( INS_ARG ) { (void)exc; args[0] = ABS( args[0] ); }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,261
static void Ins_ALIGNPTS( INS_ARG ) { Int p1, p2; TT_F26Dot6 distance; p1 = (Int)args[0]; p2 = (Int)args[1]; if ( BOUNDS( args[0], CUR.zp1.n_points ) || BOUNDS( args[1], CUR.zp0.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } distance =...
DoS
0
static void Ins_ALIGNPTS( INS_ARG ) { Int p1, p2; TT_F26Dot6 distance; p1 = (Int)args[0]; p2 = (Int)args[1]; if ( BOUNDS( args[0], CUR.zp1.n_points ) || BOUNDS( args[1], CUR.zp0.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } distance =...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,262
static void Ins_AND( INS_ARG ) { (void)exc; if ( args[0] != 0 && args[1] != 0 ) args[0] = 1; else args[0] = 0; }
DoS
0
static void Ins_AND( INS_ARG ) { (void)exc; if ( args[0] != 0 && args[1] != 0 ) args[0] = 1; else args[0] = 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,263
static void Ins_CALL( INS_ARG ) { PCallRecord pCrec; if ( BOUNDS( args[0], CUR.numFDefs ) || !CUR.FDefs[args[0]].Active ) { CUR.error = TT_Err_Invalid_Reference; return; } if ( CUR.callTop >= CUR.callSize ) { CUR.error = TT_Err_Stack_Overflow; return; } D...
DoS
0
static void Ins_CALL( INS_ARG ) { PCallRecord pCrec; if ( BOUNDS( args[0], CUR.numFDefs ) || !CUR.FDefs[args[0]].Active ) { CUR.error = TT_Err_Invalid_Reference; return; } if ( CUR.callTop >= CUR.callSize ) { CUR.error = TT_Err_Stack_Overflow; return; } D...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,264
static void Ins_CEILING( INS_ARG ) { (void)exc; args[0] = (args[0] + 63) & (-64); }
DoS
0
static void Ins_CEILING( INS_ARG ) { (void)exc; args[0] = (args[0] + 63) & (-64); }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,265
static void Ins_CLEAR( INS_ARG ) { (void)args; CUR.new_top = 0; }
DoS
0
static void Ins_CLEAR( INS_ARG ) { (void)args; CUR.new_top = 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,266
static void Ins_DELTAC( INS_ARG ) { Long nump, k; Long A, B, C; nump = args[0]; for ( k = 1; k <= nump; k++ ) { if ( CUR.args < 2 ) { CUR.error = TT_Err_Too_Few_Arguments; return; } CUR.args -= 2; A = CUR.stack[CUR.args + 1]; B = CUR.sta...
DoS
0
static void Ins_DELTAC( INS_ARG ) { Long nump, k; Long A, B, C; nump = args[0]; for ( k = 1; k <= nump; k++ ) { if ( CUR.args < 2 ) { CUR.error = TT_Err_Too_Few_Arguments; return; } CUR.args -= 2; A = CUR.stack[CUR.args + 1]; B = CUR.sta...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,267
static void Ins_DELTAP( INS_ARG ) { Int k; Long A, B, C, nump; nump = args[0]; for ( k = 1; k <= nump; k++ ) { if ( CUR.args < 2 ) { CUR.error = TT_Err_Too_Few_Arguments; return; } CUR.args -= 2; A = CUR.stack[CUR.args + 1]; B = CUR.sta...
DoS
0
static void Ins_DELTAP( INS_ARG ) { Int k; Long A, B, C, nump; nump = args[0]; for ( k = 1; k <= nump; k++ ) { if ( CUR.args < 2 ) { CUR.error = TT_Err_Too_Few_Arguments; return; } CUR.args -= 2; A = CUR.stack[CUR.args + 1]; B = CUR.sta...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,268
static void Ins_DEPTH( INS_ARG ) { args[0] = CUR.top; }
DoS
0
static void Ins_DEPTH( INS_ARG ) { args[0] = CUR.top; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,269
static void Ins_DIV( INS_ARG ) { if ( args[1] == 0 ) { CUR.error = TT_Err_Divide_By_Zero; return; } args[0] = MulDiv_Round( args[0], 64L, args[1] ); DBG_PRINT1(" %d", args[0]); }
DoS
0
static void Ins_DIV( INS_ARG ) { if ( args[1] == 0 ) { CUR.error = TT_Err_Divide_By_Zero; return; } args[0] = MulDiv_Round( args[0], 64L, args[1] ); DBG_PRINT1(" %d", args[0]); }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,270
static void Ins_DUP( INS_ARG ) { (void)exc; args[1] = args[0]; }
DoS
0
static void Ins_DUP( INS_ARG ) { (void)exc; args[1] = args[0]; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,271
static void Ins_EIF( INS_ARG ) { (void)exc; (void)args; /* nothing to do */ }
DoS
0
static void Ins_EIF( INS_ARG ) { (void)exc; (void)args; /* nothing to do */ }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,272
static void Ins_ELSE( INS_ARG ) { Int nIfs; (void)args; nIfs = 1; do { if ( SKIP_Code() == FAILURE ) return; switch ( CUR.opcode ) { case 0x58: /* IF */ nIfs++; break; case 0x59: /* EIF */ nIfs--; break; } ...
DoS
0
static void Ins_ELSE( INS_ARG ) { Int nIfs; (void)args; nIfs = 1; do { if ( SKIP_Code() == FAILURE ) return; switch ( CUR.opcode ) { case 0x58: /* IF */ nIfs++; break; case 0x59: /* EIF */ nIfs--; break; } ...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,273
static void Ins_EQ( INS_ARG ) { (void)exc; if ( args[0] == args[1] ) args[0] = 1; else args[0] = 0; }
DoS
0
static void Ins_EQ( INS_ARG ) { (void)exc; if ( args[0] == args[1] ) args[0] = 1; else args[0] = 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,274
static void Ins_FDEF( INS_ARG ) { PDefRecord pRec; if ( BOUNDS( args[0], CUR.numFDefs ) ) { CUR.error = TT_Err_Invalid_Reference; return; } pRec = &CUR.FDefs[args[0]]; pRec->Range = CUR.curRange; pRec->Opc = (Byte)(args[0]); pRec->Start = CUR.IP + 1; pRec->A...
DoS
0
static void Ins_FDEF( INS_ARG ) { PDefRecord pRec; if ( BOUNDS( args[0], CUR.numFDefs ) ) { CUR.error = TT_Err_Invalid_Reference; return; } pRec = &CUR.FDefs[args[0]]; pRec->Range = CUR.curRange; pRec->Opc = (Byte)(args[0]); pRec->Start = CUR.IP + 1; pRec->A...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,275
static void Ins_FLIPOFF( INS_ARG ) { (void)args; CUR.GS.auto_flip = FALSE; }
DoS
0
static void Ins_FLIPOFF( INS_ARG ) { (void)args; CUR.GS.auto_flip = FALSE; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,276
static void Ins_FLIPON( INS_ARG ) { (void)args; CUR.GS.auto_flip = TRUE; }
DoS
0
static void Ins_FLIPON( INS_ARG ) { (void)args; CUR.GS.auto_flip = TRUE; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,277
static void Ins_FLIPPT( INS_ARG ) { Long point; (void)args; if ( CUR.top < CUR.GS.loop ) { CUR.error = TT_Err_Too_Few_Arguments; return; } while ( CUR.GS.loop > 0 ) { CUR.args--; point = CUR.stack[CUR.args]; if ( BOUNDS( point, CUR.pts.n_points ) ) ...
DoS
0
static void Ins_FLIPPT( INS_ARG ) { Long point; (void)args; if ( CUR.top < CUR.GS.loop ) { CUR.error = TT_Err_Too_Few_Arguments; return; } while ( CUR.GS.loop > 0 ) { CUR.args--; point = CUR.stack[CUR.args]; if ( BOUNDS( point, CUR.pts.n_points ) ) ...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,278
static void Ins_FLIPRGON( INS_ARG ) { Long I, K, L; K = args[1]; L = args[0]; if ( BOUNDS( K, CUR.pts.n_points ) || BOUNDS( L, CUR.pts.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } for ( I = L; I <= K; I++ ) CUR.pts.touch[I] |= TT_Flag_On_...
DoS
0
static void Ins_FLIPRGON( INS_ARG ) { Long I, K, L; K = args[1]; L = args[0]; if ( BOUNDS( K, CUR.pts.n_points ) || BOUNDS( L, CUR.pts.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } for ( I = L; I <= K; I++ ) CUR.pts.touch[I] |= TT_Flag_On_...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,279
static void Ins_GETINFO( INS_ARG ) { Long K; K = 0; /* We return then Windows 3.1 version number */ /* for the font scaler */ if ( (args[0] & 1) != 0 ) K = 3; /* Has the glyph been rotated ? */ if ( CUR.metrics.rotated ) K |= 0x80; /* Has the g...
DoS
0
static void Ins_GETINFO( INS_ARG ) { Long K; K = 0; /* We return then Windows 3.1 version number */ /* for the font scaler */ if ( (args[0] & 1) != 0 ) K = 3; /* Has the glyph been rotated ? */ if ( CUR.metrics.rotated ) K |= 0x80; /* Has the g...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,280
static void Ins_GFV( INS_ARG ) { args[0] = CUR.GS.freeVector.x; args[1] = CUR.GS.freeVector.y; }
DoS
0
static void Ins_GFV( INS_ARG ) { args[0] = CUR.GS.freeVector.x; args[1] = CUR.GS.freeVector.y; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,281
static void Ins_GPV( INS_ARG ) { args[0] = CUR.GS.projVector.x; args[1] = CUR.GS.projVector.y; }
DoS
0
static void Ins_GPV( INS_ARG ) { args[0] = CUR.GS.projVector.x; args[1] = CUR.GS.projVector.y; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,282
static void Ins_GT( INS_ARG ) { (void)exc; if ( args[0] > args[1] ) args[0] = 1; else args[0] = 0; }
DoS
0
static void Ins_GT( INS_ARG ) { (void)exc; if ( args[0] > args[1] ) args[0] = 1; else args[0] = 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,283
static void Ins_GTEQ( INS_ARG ) { (void)exc; if ( args[0] >= args[1] ) args[0] = 1; else args[0] = 0; }
DoS
0
static void Ins_GTEQ( INS_ARG ) { (void)exc; if ( args[0] >= args[1] ) args[0] = 1; else args[0] = 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,284
static Bool Ins_Goto_CodeRange( EXEC_OPS Int aRange, Int aIP ) { TCodeRange* WITH; if ( aRange < 1 || aRange > 3 ) { CUR.error = TT_Err_Bad_Argument; return FAILURE; } WITH = &CUR.codeRangeTable[aRange - 1]; if ( WITH->Base == NULL ) /* invalid coderange */ { ...
DoS
0
static Bool Ins_Goto_CodeRange( EXEC_OPS Int aRange, Int aIP ) { TCodeRange* WITH; if ( aRange < 1 || aRange > 3 ) { CUR.error = TT_Err_Bad_Argument; return FAILURE; } WITH = &CUR.codeRangeTable[aRange - 1]; if ( WITH->Base == NULL ) /* invalid coderange */ { ...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,285
static void Ins_IDEF( INS_ARG ) { if (CUR.countIDefs >= CUR.numIDefs || args[0] > 255) CUR.error = TT_Err_Storage_Overflow; else { PDefRecord pTDR; CUR.IDefPtr[(Byte)(args[0])] = CUR.countIDefs; pTDR = &CUR.IDefs[CUR.countIDefs++]; pTDR->Opc = (Byte)(args[0...
DoS
0
static void Ins_IDEF( INS_ARG ) { if (CUR.countIDefs >= CUR.numIDefs || args[0] > 255) CUR.error = TT_Err_Storage_Overflow; else { PDefRecord pTDR; CUR.IDefPtr[(Byte)(args[0])] = CUR.countIDefs; pTDR = &CUR.IDefs[CUR.countIDefs++]; pTDR->Opc = (Byte)(args[0...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,286
static void Ins_IF( INS_ARG ) { Int nIfs; Bool Out; if ( args[0] != 0 ) return; nIfs = 1; Out = 0; do { if ( SKIP_Code() == FAILURE ) return; switch ( CUR.opcode ) { case 0x58: /* IF */ nIfs++; break; case 0x1b: ...
DoS
0
static void Ins_IF( INS_ARG ) { Int nIfs; Bool Out; if ( args[0] != 0 ) return; nIfs = 1; Out = 0; do { if ( SKIP_Code() == FAILURE ) return; switch ( CUR.opcode ) { case 0x58: /* IF */ nIfs++; break; case 0x1b: ...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,287
static void Ins_INSTCTRL( INS_ARG ) { Long K, L; K = args[1]; L = args[0]; if ( K < 0 || K > 3 ) { CUR.error = TT_Err_Invalid_Reference; return; } CUR.GS.instruct_control = (Int)((CUR.GS.instruct_control & (~K)) | (L & K)); }
DoS
0
static void Ins_INSTCTRL( INS_ARG ) { Long K, L; K = args[1]; L = args[0]; if ( K < 0 || K > 3 ) { CUR.error = TT_Err_Invalid_Reference; return; } CUR.GS.instruct_control = (Int)((CUR.GS.instruct_control & (~K)) | (L & K)); }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,288
static void Ins_ISECT( INS_ARG ) { Long point, /* are these Ints or Longs? */ a0, a1, b0, b1; TT_F26Dot6 discriminant; TT_F26Dot6 dx, dy, dax, day, dbx, dby; TT_F26Dot6 val; TT_Vector R; point = args[0]; a0 = arg...
DoS
0
static void Ins_ISECT( INS_ARG ) { Long point, /* are these Ints or Longs? */ a0, a1, b0, b1; TT_F26Dot6 discriminant; TT_F26Dot6 dx, dy, dax, day, dbx, dby; TT_F26Dot6 val; TT_Vector R; point = args[0]; a0 = arg...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,289
static void Ins_IUP( INS_ARG ) { struct LOC_Ins_IUP V; unsigned char mask; Long first_point; /* first point of contour */ Long end_point; /* end point (last+1) of contour */ Long first_touched; /* first touched point in contour */ Long cur_touched; /* current touch...
DoS
0
static void Ins_IUP( INS_ARG ) { struct LOC_Ins_IUP V; unsigned char mask; Long first_point; /* first point of contour */ Long end_point; /* end point (last+1) of contour */ Long first_touched; /* first touched point in contour */ Long cur_touched; /* current touch...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,290
static void Ins_JROT( INS_ARG ) { if ( args[1] != 0 ) { CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE; /* See JMPR below */ if(CUR.IP > CUR.codeSize || (CUR.code[CUR.IP] != 0x2D && CUR.code[CUR.IP - 1] == 0x2D)) CUR.IP -= 1; } }
DoS
0
static void Ins_JROT( INS_ARG ) { if ( args[1] != 0 ) { CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE; /* See JMPR below */ if(CUR.IP > CUR.codeSize || (CUR.code[CUR.IP] != 0x2D && CUR.code[CUR.IP - 1] == 0x2D)) CUR.IP -= 1; } }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,291
static void Ins_LOOPCALL( INS_ARG ) { PCallRecord pTCR; if ( BOUNDS( args[1], CUR.numFDefs ) || !CUR.FDefs[args[1]].Active ) { CUR.error = TT_Err_Invalid_Reference; return; } if ( CUR.callTop >= CUR.callSize ) { CUR.error = TT_Err_Stack_Overflow; return; } ...
DoS
0
static void Ins_LOOPCALL( INS_ARG ) { PCallRecord pTCR; if ( BOUNDS( args[1], CUR.numFDefs ) || !CUR.FDefs[args[1]].Active ) { CUR.error = TT_Err_Invalid_Reference; return; } if ( CUR.callTop >= CUR.callSize ) { CUR.error = TT_Err_Stack_Overflow; return; } ...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,292
static void Ins_LT( INS_ARG ) { (void)exc; if ( args[0] < args[1] ) args[0] = 1; else args[0] = 0; }
DoS
0
static void Ins_LT( INS_ARG ) { (void)exc; if ( args[0] < args[1] ) args[0] = 1; else args[0] = 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,293
static void Ins_LTEQ( INS_ARG ) { (void)exc; if ( args[0] <= args[1] ) args[0] = 1; else args[0] = 0; }
DoS
0
static void Ins_LTEQ( INS_ARG ) { (void)exc; if ( args[0] <= args[1] ) args[0] = 1; else args[0] = 0; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,294
static void Ins_MAX( INS_ARG ) { (void)exc; if ( args[1] > args[0] ) args[0] = args[1]; }
DoS
0
static void Ins_MAX( INS_ARG ) { (void)exc; if ( args[1] > args[0] ) args[0] = args[1]; }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,295
static void Ins_MD( INS_ARG ) { Long K, L; TT_F26Dot6 D; K = args[1]; L = args[0]; if( BOUNDS( args[0], CUR.zp2.n_points ) || BOUNDS( args[1], CUR.zp1.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } if ( CUR.opcode & 1 ) D = CUR_Func...
DoS
0
static void Ins_MD( INS_ARG ) { Long K, L; TT_F26Dot6 D; K = args[1]; L = args[0]; if( BOUNDS( args[0], CUR.zp2.n_points ) || BOUNDS( args[1], CUR.zp1.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } if ( CUR.opcode & 1 ) D = CUR_Func...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,296
static void Ins_MDAP( INS_ARG ) { Int point; TT_F26Dot6 cur_dist, distance; point = (Int)args[0]; if ( BOUNDS( args[0], CUR.zp0.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } /* XXX: Is there some undocumented feature while in the ...
DoS
0
static void Ins_MDAP( INS_ARG ) { Int point; TT_F26Dot6 cur_dist, distance; point = (Int)args[0]; if ( BOUNDS( args[0], CUR.zp0.n_points ) ) { CUR.error = TT_Err_Invalid_Reference; return; } /* XXX: Is there some undocumented feature while in the ...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,297
static void Ins_MINDEX( INS_ARG ) { Long L, K; L = args[0]; if (L == 0) return; if ( L<0 || L > CUR.args ) { CUR.error = TT_Err_Invalid_Reference; return; } K = CUR.stack[CUR.args - L]; memmove( (&CUR.stack[CUR.args - L ]), (&CUR.stack[CUR....
DoS
0
static void Ins_MINDEX( INS_ARG ) { Long L, K; L = args[0]; if (L == 0) return; if ( L<0 || L > CUR.args ) { CUR.error = TT_Err_Invalid_Reference; return; } K = CUR.stack[CUR.args - L]; memmove( (&CUR.stack[CUR.args - L ]), (&CUR.stack[CUR....
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,298
static void Ins_MIRP( INS_ARG ) { Int point, cvtEntry; TT_F26Dot6 cvt_dist, distance, cur_dist, org_dist; point = (Int)args[0]; cvtEntry = (Int)args[1]; /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */ if ( BOUNDS( a...
DoS
0
static void Ins_MIRP( INS_ARG ) { Int point, cvtEntry; TT_F26Dot6 cvt_dist, distance, cur_dist, org_dist; point = (Int)args[0]; cvtEntry = (Int)args[1]; /* XXX: UNDOCUMENTED! cvt[-1] = 0 always */ if ( BOUNDS( a...
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null
4,299
static void Ins_MPPEM( INS_ARG ) { args[0] = CURRENT_Ppem(); DBG_PRINT1(" %d", args[0]); }
DoS
0
static void Ins_MPPEM( INS_ARG ) { args[0] = CURRENT_Ppem(); DBG_PRINT1(" %d", args[0]); }
@@ -1794,6 +1794,12 @@ static int nInstrCount=0; static void Ins_JMPR( INS_ARG ) { + if ( BOUNDS(CUR.IP + args[0], CUR.codeSize ) ) + { + CUR.error = TT_Err_Invalid_Reference; + return; + } + CUR.IP += (Int)(args[0]); CUR.step_ins = FALSE;
CWE-125
null
null