idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
5,600
ft_black_render( black_PRaster raster, const FT_Raster_Params* params ) { const FT_Outline* outline = (const FT_Outline*)params->source; const FT_Bitmap* target_map = params->target; black_PWorker worker; if ( !raster || !raster->buffer || !raster->buffer_...
DoS Overflow
0
ft_black_render( black_PRaster raster, const FT_Raster_Params* params ) { const FT_Outline* outline = (const FT_Outline*)params->source; const FT_Bitmap* target_map = params->target; black_PWorker worker; if ( !raster || !raster->buffer || !raster->buffer_...
@@ -2553,7 +2553,7 @@ e1 = TRUNC( e1 ); - if ( e1 >= 0 && e1 < ras.target.rows ) + if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) { PByte p; @@ -2647,7 +2647,7 @@ /* bounding box instead */ if ( pxl < 0 ) ...
CWE-119
null
null
5,601
ft_black_reset( black_PRaster raster, char* pool_base, long pool_size ) { if ( raster ) { if ( pool_base && pool_size >= (long)sizeof ( black_TWorker ) + 2048 ) { black_PWorker worker = (black_PWorker)pool_base; raster->b...
DoS Overflow
0
ft_black_reset( black_PRaster raster, char* pool_base, long pool_size ) { if ( raster ) { if ( pool_base && pool_size >= (long)sizeof ( black_TWorker ) + 2048 ) { black_PWorker worker = (black_PWorker)pool_base; raster->b...
@@ -2553,7 +2553,7 @@ e1 = TRUNC( e1 ); - if ( e1 >= 0 && e1 < ras.target.rows ) + if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) { PByte p; @@ -2647,7 +2647,7 @@ /* bounding box instead */ if ( pxl < 0 ) ...
CWE-119
null
null
5,602
ft_black_set_mode( black_PRaster raster, unsigned long mode, const char* palette ) { #ifdef FT_RASTER_OPTION_ANTI_ALIASING if ( mode == FT_MAKE_TAG( 'p', 'a', 'l', '5' ) ) { /* set 5-levels gray palette */ raster->grays[0] = palette[0]; raste...
DoS Overflow
0
ft_black_set_mode( black_PRaster raster, unsigned long mode, const char* palette ) { #ifdef FT_RASTER_OPTION_ANTI_ALIASING if ( mode == FT_MAKE_TAG( 'p', 'a', 'l', '5' ) ) { /* set 5-levels gray palette */ raster->grays[0] = palette[0]; raste...
@@ -2553,7 +2553,7 @@ e1 = TRUNC( e1 ); - if ( e1 >= 0 && e1 < ras.target.rows ) + if ( e1 >= 0 && (ULong)e1 < ras.target.rows ) { PByte p; @@ -2647,7 +2647,7 @@ /* bounding box instead */ if ( pxl < 0 ) ...
CWE-119
null
null
5,603
convert_bytes_to_data( png_structp png, png_row_infop row_info, png_bytep data ) { unsigned int i; FT_UNUSED( png ); for ( i = 0; i < row_info->rowbytes; i += 4 ) { unsigned char* base = &data[i]; unsigned int red = ba...
DoS Overflow
0
convert_bytes_to_data( png_structp png, png_row_infop row_info, png_bytep data ) { unsigned int i; FT_UNUSED( png ); for ( i = 0; i < row_info->rowbytes; i += 4 ) { unsigned char* base = &data[i]; unsigned int red = ba...
@@ -205,11 +205,11 @@ goto Exit; } - if ( !populate_map_and_metrics && - ( x_offset + metrics->width > map->width || - y_offset + metrics->height > map->rows || - pix_bits != 32 || - map->pixel_mode != FT_PIXEL_MODE_BGRA...
CWE-119
null
null
5,604
error_callback( png_structp png, png_const_charp error_msg ) { FT_Error* error = (FT_Error*)png_get_error_ptr( png ); FT_UNUSED( error_msg ); *error = FT_THROW( Out_Of_Memory ); #ifdef PNG_SETJMP_SUPPORTED ft_longjmp( png_jmpbuf( png ), 1 ); #endif /* if we get here, ...
DoS Overflow
0
error_callback( png_structp png, png_const_charp error_msg ) { FT_Error* error = (FT_Error*)png_get_error_ptr( png ); FT_UNUSED( error_msg ); *error = FT_THROW( Out_Of_Memory ); #ifdef PNG_SETJMP_SUPPORTED ft_longjmp( png_jmpbuf( png ), 1 ); #endif /* if we get here, ...
@@ -205,11 +205,11 @@ goto Exit; } - if ( !populate_map_and_metrics && - ( x_offset + metrics->width > map->width || - y_offset + metrics->height > map->rows || - pix_bits != 32 || - map->pixel_mode != FT_PIXEL_MODE_BGRA...
CWE-119
null
null
5,605
multiply_alpha( int alpha, int color ) { int temp = ( alpha * color ) + 0x80; return ( temp + ( temp >> 8 ) ) >> 8; }
DoS Overflow
0
multiply_alpha( int alpha, int color ) { int temp = ( alpha * color ) + 0x80; return ( temp + ( temp >> 8 ) ) >> 8; }
@@ -205,11 +205,11 @@ goto Exit; } - if ( !populate_map_and_metrics && - ( x_offset + metrics->width > map->width || - y_offset + metrics->height > map->rows || - pix_bits != 32 || - map->pixel_mode != FT_PIXEL_MODE_BGRA...
CWE-119
null
null
5,606
premultiply_data( png_structp png, png_row_infop row_info, png_bytep data ) { unsigned int i; FT_UNUSED( png ); for ( i = 0; i < row_info->rowbytes; i += 4 ) { unsigned char* base = &data[i]; unsigned int alpha = base[3]; ...
DoS Overflow
0
premultiply_data( png_structp png, png_row_infop row_info, png_bytep data ) { unsigned int i; FT_UNUSED( png ); for ( i = 0; i < row_info->rowbytes; i += 4 ) { unsigned char* base = &data[i]; unsigned int alpha = base[3]; ...
@@ -205,11 +205,11 @@ goto Exit; } - if ( !populate_map_and_metrics && - ( x_offset + metrics->width > map->width || - y_offset + metrics->height > map->rows || - pix_bits != 32 || - map->pixel_mode != FT_PIXEL_MODE_BGRA...
CWE-119
null
null
5,607
warning_callback( png_structp png, png_const_charp error_msg ) { FT_UNUSED( png ); FT_UNUSED( error_msg ); /* Just ignore warnings. */ }
DoS Overflow
0
warning_callback( png_structp png, png_const_charp error_msg ) { FT_UNUSED( png ); FT_UNUSED( error_msg ); /* Just ignore warnings. */ }
@@ -205,11 +205,11 @@ goto Exit; } - if ( !populate_map_and_metrics && - ( x_offset + metrics->width > map->width || - y_offset + metrics->height > map->rows || - pix_bits != 32 || - map->pixel_mode != FT_PIXEL_MODE_BGRA...
CWE-119
null
null
5,608
T1_Open_Face( T1_Face face ) { T1_LoaderRec loader; T1_Parser parser; T1_Font type1 = &face->type1; PS_Private priv = &type1->private_dict; FT_Error error; PSAux_Service psaux = (PSAux_Service)face->psaux; t1_init_loader( &loader, face ); /* default val...
DoS Overflow
0
T1_Open_Face( T1_Face face ) { T1_LoaderRec loader; T1_Parser parser; T1_Font type1 = &face->type1; PS_Private priv = &type1->private_dict; FT_Error error; PSAux_Service psaux = (PSAux_Service)face->psaux; t1_init_loader( &loader, face ); /* default val...
@@ -1604,7 +1604,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { error = FT_THROW( Invalid_File_Format ); goto Fail;
CWE-119
null
null
5,609
T1_Set_MM_Blend( T1_Face face, FT_UInt num_coords, FT_Fixed* coords ) { PS_Blend blend = face->blend; FT_Error error; FT_UInt n, m; error = FT_ERR( Invalid_Argument ); if ( blend && blend->num_axis == num_coords ) { /* recompute the w...
DoS Overflow
0
T1_Set_MM_Blend( T1_Face face, FT_UInt num_coords, FT_Fixed* coords ) { PS_Blend blend = face->blend; FT_Error error; FT_UInt n, m; error = FT_ERR( Invalid_Argument ); if ( blend && blend->num_axis == num_coords ) { /* recompute the w...
@@ -1604,7 +1604,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { error = FT_THROW( Invalid_File_Format ); goto Fail;
CWE-119
null
null
5,610
parse_encoding( T1_Face face, T1_Loader loader ) { T1_Parser parser = &loader->parser; FT_Byte* cur; FT_Byte* limit = parser->root.limit; PSAux_Service psaux = (PSAux_Service)face->psaux; T1_Skip_Spaces( parser ); cur = parser->root.cursor; if ( cur >= lim...
DoS Overflow
0
parse_encoding( T1_Face face, T1_Loader loader ) { T1_Parser parser = &loader->parser; FT_Byte* cur; FT_Byte* limit = parser->root.limit; PSAux_Service psaux = (PSAux_Service)face->psaux; T1_Skip_Spaces( parser ); cur = parser->root.cursor; if ( cur >= lim...
@@ -1604,7 +1604,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { error = FT_THROW( Invalid_File_Format ); goto Fail;
CWE-119
null
null
5,611
parse_subrs( T1_Face face, T1_Loader loader ) { T1_Parser parser = &loader->parser; PS_Table table = &loader->subrs; FT_Memory memory = parser->root.memory; FT_Error error; FT_Int num_subrs; PSAux_Service psaux = (PSAux_Service)face->psaux; T1_Skip_Space...
DoS Overflow
0
parse_subrs( T1_Face face, T1_Loader loader ) { T1_Parser parser = &loader->parser; PS_Table table = &loader->subrs; FT_Memory memory = parser->root.memory; FT_Error error; FT_Int num_subrs; PSAux_Service psaux = (PSAux_Service)face->psaux; T1_Skip_Space...
@@ -1604,7 +1604,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { error = FT_THROW( Invalid_File_Format ); goto Fail;
CWE-119
null
null
5,612
t1_done_loader( T1_Loader loader ) { T1_Parser parser = &loader->parser; /* finalize tables */ T1_Release_Table( &loader->encoding_table ); T1_Release_Table( &loader->charstrings ); T1_Release_Table( &loader->glyph_names ); T1_Release_Table( &loader->swap_table ); T1_Release_Table( &...
DoS Overflow
0
t1_done_loader( T1_Loader loader ) { T1_Parser parser = &loader->parser; /* finalize tables */ T1_Release_Table( &loader->encoding_table ); T1_Release_Table( &loader->charstrings ); T1_Release_Table( &loader->glyph_names ); T1_Release_Table( &loader->swap_table ); T1_Release_Table( &...
@@ -1604,7 +1604,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { error = FT_THROW( Invalid_File_Format ); goto Fail;
CWE-119
null
null
5,613
t1_init_loader( T1_Loader loader, T1_Face face ) { FT_UNUSED( face ); FT_MEM_ZERO( loader, sizeof ( *loader ) ); loader->num_glyphs = 0; loader->num_chars = 0; /* initialize the tables -- simply set their `init' field to 0 */ loader->encoding_table.init = 0; loa...
DoS Overflow
0
t1_init_loader( T1_Loader loader, T1_Face face ) { FT_UNUSED( face ); FT_MEM_ZERO( loader, sizeof ( *loader ) ); loader->num_glyphs = 0; loader->num_chars = 0; /* initialize the tables -- simply set their `init' field to 0 */ loader->encoding_table.init = 0; loa...
@@ -1604,7 +1604,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { error = FT_THROW( Invalid_File_Format ); goto Fail;
CWE-119
null
null
5,614
t42_is_space( FT_Byte c ) { return ( c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\f' || c == '\0' ); }
DoS Overflow
0
t42_is_space( FT_Byte c ) { return ( c == ' ' || c == '\t' || c == '\r' || c == '\n' || c == '\f' || c == '\0' ); }
@@ -858,7 +858,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format );
CWE-119
null
null
5,615
t42_loader_done( T42_Loader loader ) { T42_Parser parser = &loader->parser; /* finalize tables */ T1_Release_Table( &loader->encoding_table ); T1_Release_Table( &loader->charstrings ); T1_Release_Table( &loader->glyph_names ); T1_Release_Table( &loader->swap_table ); /* finalize par...
DoS Overflow
0
t42_loader_done( T42_Loader loader ) { T42_Parser parser = &loader->parser; /* finalize tables */ T1_Release_Table( &loader->encoding_table ); T1_Release_Table( &loader->charstrings ); T1_Release_Table( &loader->glyph_names ); T1_Release_Table( &loader->swap_table ); /* finalize par...
@@ -858,7 +858,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format );
CWE-119
null
null
5,616
t42_loader_init( T42_Loader loader, T42_Face face ) { FT_UNUSED( face ); FT_MEM_ZERO( loader, sizeof ( *loader ) ); loader->num_glyphs = 0; loader->num_chars = 0; /* initialize the tables -- simply set their `init' field to 0 */ loader->encoding_table.init = 0; ...
DoS Overflow
0
t42_loader_init( T42_Loader loader, T42_Face face ) { FT_UNUSED( face ); FT_MEM_ZERO( loader, sizeof ( *loader ) ); loader->num_glyphs = 0; loader->num_chars = 0; /* initialize the tables -- simply set their `init' field to 0 */ loader->encoding_table.init = 0; ...
@@ -858,7 +858,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format );
CWE-119
null
null
5,617
t42_parse_dict( T42_Face face, T42_Loader loader, FT_Byte* base, FT_Long size ) { T42_Parser parser = &loader->parser; FT_Byte* limit; FT_Int n_keywords = (FT_Int)( sizeof ( t42_keywords ) / ...
DoS Overflow
0
t42_parse_dict( T42_Face face, T42_Loader loader, FT_Byte* base, FT_Long size ) { T42_Parser parser = &loader->parser; FT_Byte* limit; FT_Int n_keywords = (FT_Int)( sizeof ( t42_keywords ) / ...
@@ -858,7 +858,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format );
CWE-119
null
null
5,618
t42_parse_encoding( T42_Face face, T42_Loader loader ) { T42_Parser parser = &loader->parser; FT_Byte* cur; FT_Byte* limit = parser->root.limit; PSAux_Service psaux = (PSAux_Service)face->psaux; T1_Skip_Spaces( parser ); cur = parser->root.cursor; i...
DoS Overflow
0
t42_parse_encoding( T42_Face face, T42_Loader loader ) { T42_Parser parser = &loader->parser; FT_Byte* cur; FT_Byte* limit = parser->root.limit; PSAux_Service psaux = (PSAux_Service)face->psaux; T1_Skip_Spaces( parser ); cur = parser->root.cursor; i...
@@ -858,7 +858,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format );
CWE-119
null
null
5,619
t42_parse_font_matrix( T42_Face face, T42_Loader loader ) { T42_Parser parser = &loader->parser; FT_Matrix* matrix = &face->type1.font_matrix; FT_Vector* offset = &face->type1.font_offset; FT_Face root = (FT_Face)&face->root; FT_Fixed temp[6]; FT_Fixe...
DoS Overflow
0
t42_parse_font_matrix( T42_Face face, T42_Loader loader ) { T42_Parser parser = &loader->parser; FT_Matrix* matrix = &face->type1.font_matrix; FT_Vector* offset = &face->type1.font_offset; FT_Face root = (FT_Face)&face->root; FT_Fixed temp[6]; FT_Fixe...
@@ -858,7 +858,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format );
CWE-119
null
null
5,620
t42_parse_sfnts( T42_Face face, T42_Loader loader ) { T42_Parser parser = &loader->parser; FT_Memory memory = parser->root.memory; FT_Byte* cur; FT_Byte* limit = parser->root.limit; FT_Error error; FT_Int num_tables = 0; FT_ULong count, ttf_siz...
DoS Overflow
0
t42_parse_sfnts( T42_Face face, T42_Loader loader ) { T42_Parser parser = &loader->parser; FT_Memory memory = parser->root.memory; FT_Byte* cur; FT_Byte* limit = parser->root.limit; FT_Error error; FT_Int num_tables = 0; FT_ULong count, ttf_siz...
@@ -858,7 +858,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format );
CWE-119
null
null
5,621
t42_parser_init( T42_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux ) { FT_Error error = FT_Err_Ok; FT_Long size; psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory ); parser->stream = str...
DoS Overflow
0
t42_parser_init( T42_Parser parser, FT_Stream stream, FT_Memory memory, PSAux_Service psaux ) { FT_Error error = FT_Err_Ok; FT_Long size; psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory ); parser->stream = str...
@@ -858,7 +858,7 @@ FT_PtrDist len; - if ( cur + 1 >= limit ) + if ( cur + 2 >= limit ) { FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); error = FT_THROW( Invalid_File_Format );
CWE-119
null
null
5,622
t42_parse_sfnts( T42_Face face, T42_Loader loader ) { T42_Parser parser = &loader->parser; FT_Memory memory = parser->root.memory; FT_Byte* cur; FT_Byte* limit = parser->root.limit; FT_Error error; FT_Int num_tables = 0; FT_ULong count; FT...
DoS Overflow
0
t42_parse_sfnts( T42_Face face, T42_Loader loader ) { T42_Parser parser = &loader->parser; FT_Memory memory = parser->root.memory; FT_Byte* cur; FT_Byte* limit = parser->root.limit; FT_Error error; FT_Int num_tables = 0; FT_ULong count; FT...
@@ -849,6 +849,12 @@ break; T1_Skip_PS_Token( parser ); + if ( parser->root.cursor >= limit ) + { + FT_ERROR(( "t42_parse_charstrings: out of bounds\n" )); + error = FT_THROW( Invalid_File_Format ); + goto Fail; + } if ( parser->root.error ) return;
CWE-119
null
null
5,623
tt_cmap10_get_info( TT_CMap cmap, TT_CMapInfo *cmap_info ) { FT_Byte* p = cmap->data + 8; cmap_info->format = 10; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); return FT_Err_Ok; }
DoS Overflow
0
tt_cmap10_get_info( TT_CMap cmap, TT_CMapInfo *cmap_info ) { FT_Byte* p = cmap->data + 8; cmap_info->format = 10; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); return FT_Err_Ok; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,624
tt_cmap10_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p = table + 4; FT_ULong length, count; if ( table + 20 > valid->limit ) FT_INVALID_TOO_SHORT; length = TT_NEXT_ULONG( p ); p = table + 16; count = TT_NEXT_ULONG( p ); if ( le...
DoS Overflow
0
tt_cmap10_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p = table + 4; FT_ULong length, count; if ( table + 20 > valid->limit ) FT_INVALID_TOO_SHORT; length = TT_NEXT_ULONG( p ); p = table + 16; count = TT_NEXT_ULONG( p ); if ( le...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,625
tt_cmap12_char_index( TT_CMap cmap, FT_UInt32 char_code ) { return tt_cmap12_char_map_binary( cmap, &char_code, 0 ); }
DoS Overflow
0
tt_cmap12_char_index( TT_CMap cmap, FT_UInt32 char_code ) { return tt_cmap12_char_map_binary( cmap, &char_code, 0 ); }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,626
tt_cmap12_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { TT_CMap12 cmap12 = (TT_CMap12)cmap; FT_ULong gindex; if ( cmap12->cur_charcode >= 0xFFFFFFFFUL ) return 0; /* no need to search */ if ( cmap12->valid && cmap12->cur_charcode == *pchar_code ) ...
DoS Overflow
0
tt_cmap12_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { TT_CMap12 cmap12 = (TT_CMap12)cmap; FT_ULong gindex; if ( cmap12->cur_charcode >= 0xFFFFFFFFUL ) return 0; /* no need to search */ if ( cmap12->valid && cmap12->cur_charcode == *pchar_code ) ...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,627
tt_cmap12_init( TT_CMap12 cmap, FT_Byte* table ) { cmap->cmap.data = table; table += 12; cmap->num_groups = FT_PEEK_ULONG( table ); cmap->valid = 0; return FT_Err_Ok; }
DoS Overflow
0
tt_cmap12_init( TT_CMap12 cmap, FT_Byte* table ) { cmap->cmap.data = table; table += 12; cmap->num_groups = FT_PEEK_ULONG( table ); cmap->valid = 0; return FT_Err_Ok; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,628
tt_cmap12_next( TT_CMap12 cmap ) { FT_Byte* p; FT_ULong start, end, start_id, char_code; FT_ULong n; FT_UInt gindex; if ( cmap->cur_charcode >= 0xFFFFFFFFUL ) goto Fail; char_code = cmap->cur_charcode + 1; for ( n = cmap->cur_group; n < cmap->num_groups; n++ ) { ...
DoS Overflow
0
tt_cmap12_next( TT_CMap12 cmap ) { FT_Byte* p; FT_ULong start, end, start_id, char_code; FT_ULong n; FT_UInt gindex; if ( cmap->cur_charcode >= 0xFFFFFFFFUL ) goto Fail; char_code = cmap->cur_charcode + 1; for ( n = cmap->cur_group; n < cmap->num_groups; n++ ) { ...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,629
tt_cmap12_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p; FT_ULong length; FT_ULong num_groups; if ( table + 16 > valid->limit ) FT_INVALID_TOO_SHORT; p = table + 4; length = TT_NEXT_ULONG( p ); p = table + 12; num_g...
DoS Overflow
0
tt_cmap12_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p; FT_ULong length; FT_ULong num_groups; if ( table + 16 > valid->limit ) FT_INVALID_TOO_SHORT; p = table + 4; length = TT_NEXT_ULONG( p ); p = table + 12; num_g...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,630
tt_cmap13_char_index( TT_CMap cmap, FT_UInt32 char_code ) { return tt_cmap13_char_map_binary( cmap, &char_code, 0 ); }
DoS Overflow
0
tt_cmap13_char_index( TT_CMap cmap, FT_UInt32 char_code ) { return tt_cmap13_char_map_binary( cmap, &char_code, 0 ); }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,631
tt_cmap13_char_map_binary( TT_CMap cmap, FT_UInt32* pchar_code, FT_Bool next ) { FT_UInt gindex = 0; FT_Byte* p = cmap->data + 12; FT_UInt32 num_groups = TT_PEEK_ULONG( p ); FT_UInt32 char_code = *pchar_code; ...
DoS Overflow
0
tt_cmap13_char_map_binary( TT_CMap cmap, FT_UInt32* pchar_code, FT_Bool next ) { FT_UInt gindex = 0; FT_Byte* p = cmap->data + 12; FT_UInt32 num_groups = TT_PEEK_ULONG( p ); FT_UInt32 char_code = *pchar_code; ...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,632
tt_cmap13_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { TT_CMap13 cmap13 = (TT_CMap13)cmap; FT_UInt gindex; if ( cmap13->cur_charcode >= 0xFFFFFFFFUL ) return 0; /* no need to search */ if ( cmap13->valid && cmap13->cur_charcode == *pchar_code ) ...
DoS Overflow
0
tt_cmap13_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { TT_CMap13 cmap13 = (TT_CMap13)cmap; FT_UInt gindex; if ( cmap13->cur_charcode >= 0xFFFFFFFFUL ) return 0; /* no need to search */ if ( cmap13->valid && cmap13->cur_charcode == *pchar_code ) ...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,633
tt_cmap13_get_info( TT_CMap cmap, TT_CMapInfo *cmap_info ) { FT_Byte* p = cmap->data + 8; cmap_info->format = 13; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); return FT_Err_Ok; }
DoS Overflow
0
tt_cmap13_get_info( TT_CMap cmap, TT_CMapInfo *cmap_info ) { FT_Byte* p = cmap->data + 8; cmap_info->format = 13; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); return FT_Err_Ok; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,634
tt_cmap13_init( TT_CMap13 cmap, FT_Byte* table ) { cmap->cmap.data = table; table += 12; cmap->num_groups = FT_PEEK_ULONG( table ); cmap->valid = 0; return FT_Err_Ok; }
DoS Overflow
0
tt_cmap13_init( TT_CMap13 cmap, FT_Byte* table ) { cmap->cmap.data = table; table += 12; cmap->num_groups = FT_PEEK_ULONG( table ); cmap->valid = 0; return FT_Err_Ok; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,635
tt_cmap13_next( TT_CMap13 cmap ) { FT_Byte* p; FT_ULong start, end, glyph_id, char_code; FT_ULong n; FT_UInt gindex; if ( cmap->cur_charcode >= 0xFFFFFFFFUL ) goto Fail; char_code = cmap->cur_charcode + 1; for ( n = cmap->cur_group; n < cmap->num_groups; n++ ) { ...
DoS Overflow
0
tt_cmap13_next( TT_CMap13 cmap ) { FT_Byte* p; FT_ULong start, end, glyph_id, char_code; FT_ULong n; FT_UInt gindex; if ( cmap->cur_charcode >= 0xFFFFFFFFUL ) goto Fail; char_code = cmap->cur_charcode + 1; for ( n = cmap->cur_group; n < cmap->num_groups; n++ ) { ...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,636
tt_cmap13_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p; FT_ULong length; FT_ULong num_groups; if ( table + 16 > valid->limit ) FT_INVALID_TOO_SHORT; p = table + 4; length = TT_NEXT_ULONG( p ); p = table + 12; num_g...
DoS Overflow
0
tt_cmap13_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p; FT_ULong length; FT_ULong num_groups; if ( table + 16 > valid->limit ) FT_INVALID_TOO_SHORT; p = table + 4; length = TT_NEXT_ULONG( p ); p = table + 12; num_g...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,637
tt_cmap14_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_UNUSED( cmap ); FT_UNUSED( char_code ); /* This can't happen */ return 0; }
DoS Overflow
0
tt_cmap14_char_index( TT_CMap cmap, FT_UInt32 char_code ) { FT_UNUSED( cmap ); FT_UNUSED( char_code ); /* This can't happen */ return 0; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,638
tt_cmap14_char_map_def_binary( FT_Byte *base, FT_UInt32 char_code ) { FT_UInt32 numRanges = TT_PEEK_ULONG( base ); FT_UInt32 max, min; min = 0; max = numRanges; base += 4; /* binary search */ while ( min < max ) { FT_UInt32 mid = (...
DoS Overflow
0
tt_cmap14_char_map_def_binary( FT_Byte *base, FT_UInt32 char_code ) { FT_UInt32 numRanges = TT_PEEK_ULONG( base ); FT_UInt32 max, min; min = 0; max = numRanges; base += 4; /* binary search */ while ( min < max ) { FT_UInt32 mid = (...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,639
tt_cmap14_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { FT_UNUSED( cmap ); /* This can't happen */ *pchar_code = 0; return 0; }
DoS Overflow
0
tt_cmap14_char_next( TT_CMap cmap, FT_UInt32 *pchar_code ) { FT_UNUSED( cmap ); /* This can't happen */ *pchar_code = 0; return 0; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,640
tt_cmap14_char_var_isdefault( TT_CMap cmap, FT_UInt32 charcode, FT_UInt32 variantSelector ) { FT_Byte* p = tt_cmap14_find_variant( cmap->data + 6, variantSelector ); FT_ULong defOff; FT_ULong nondefOff; if ( !p ) return ...
DoS Overflow
0
tt_cmap14_char_var_isdefault( TT_CMap cmap, FT_UInt32 charcode, FT_UInt32 variantSelector ) { FT_Byte* p = tt_cmap14_find_variant( cmap->data + 6, variantSelector ); FT_ULong defOff; FT_ULong nondefOff; if ( !p ) return ...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,641
tt_cmap14_char_variants( TT_CMap cmap, FT_Memory memory, FT_UInt32 charCode ) { TT_CMap14 cmap14 = (TT_CMap14) cmap; FT_UInt32 count = cmap14->num_selectors; FT_Byte* p = cmap->data + 10; FT_UInt32* q; if ( tt_cmap14_ens...
DoS Overflow
0
tt_cmap14_char_variants( TT_CMap cmap, FT_Memory memory, FT_UInt32 charCode ) { TT_CMap14 cmap14 = (TT_CMap14) cmap; FT_UInt32 count = cmap14->num_selectors; FT_Byte* p = cmap->data + 10; FT_UInt32* q; if ( tt_cmap14_ens...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,642
tt_cmap14_def_char_count( FT_Byte *p ) { FT_UInt32 numRanges = (FT_UInt32)TT_NEXT_ULONG( p ); FT_UInt tot = 0; p += 3; /* point to the first `cnt' field */ for ( ; numRanges > 0; numRanges-- ) { tot += 1 + p[0]; p += 4; } return tot; }
DoS Overflow
0
tt_cmap14_def_char_count( FT_Byte *p ) { FT_UInt32 numRanges = (FT_UInt32)TT_NEXT_ULONG( p ); FT_UInt tot = 0; p += 3; /* point to the first `cnt' field */ for ( ; numRanges > 0; numRanges-- ) { tot += 1 + p[0]; p += 4; } return tot; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,643
tt_cmap14_done( TT_CMap14 cmap ) { FT_Memory memory = cmap->memory; cmap->max_results = 0; if ( memory != NULL && cmap->results != NULL ) FT_FREE( cmap->results ); }
DoS Overflow
0
tt_cmap14_done( TT_CMap14 cmap ) { FT_Memory memory = cmap->memory; cmap->max_results = 0; if ( memory != NULL && cmap->results != NULL ) FT_FREE( cmap->results ); }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,644
tt_cmap14_ensure( TT_CMap14 cmap, FT_UInt32 num_results, FT_Memory memory ) { FT_UInt32 old_max = cmap->max_results; FT_Error error = FT_Err_Ok; if ( num_results > cmap->max_results ) { cmap->memory = memory; if ( FT_QRENEW_ARRAY( cmap...
DoS Overflow
0
tt_cmap14_ensure( TT_CMap14 cmap, FT_UInt32 num_results, FT_Memory memory ) { FT_UInt32 old_max = cmap->max_results; FT_Error error = FT_Err_Ok; if ( num_results > cmap->max_results ) { cmap->memory = memory; if ( FT_QRENEW_ARRAY( cmap...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,645
tt_cmap14_find_variant( FT_Byte *base, FT_UInt32 variantCode ) { FT_UInt32 numVar = TT_PEEK_ULONG( base ); FT_UInt32 max, min; min = 0; max = numVar; base += 4; /* binary search */ while ( min < max ) { FT_UInt32 mid = ( min + max ) >> 1...
DoS Overflow
0
tt_cmap14_find_variant( FT_Byte *base, FT_UInt32 variantCode ) { FT_UInt32 numVar = TT_PEEK_ULONG( base ); FT_UInt32 max, min; min = 0; max = numVar; base += 4; /* binary search */ while ( min < max ) { FT_UInt32 mid = ( min + max ) >> 1...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,646
tt_cmap14_get_def_chars( TT_CMap cmap, FT_Byte* p, FT_Memory memory ) { TT_CMap14 cmap14 = (TT_CMap14) cmap; FT_UInt32 numRanges; FT_UInt cnt; FT_UInt32* q; cnt = tt_cmap14_def_char_count( p ); numRanges = (FT_UInt3...
DoS Overflow
0
tt_cmap14_get_def_chars( TT_CMap cmap, FT_Byte* p, FT_Memory memory ) { TT_CMap14 cmap14 = (TT_CMap14) cmap; FT_UInt32 numRanges; FT_UInt cnt; FT_UInt32* q; cnt = tt_cmap14_def_char_count( p ); numRanges = (FT_UInt3...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,647
tt_cmap14_get_info( TT_CMap cmap, TT_CMapInfo *cmap_info ) { FT_UNUSED( cmap ); cmap_info->format = 14; /* subtable 14 does not define a language field */ cmap_info->language = 0xFFFFFFFFUL; return FT_Err_Ok; }
DoS Overflow
0
tt_cmap14_get_info( TT_CMap cmap, TT_CMapInfo *cmap_info ) { FT_UNUSED( cmap ); cmap_info->format = 14; /* subtable 14 does not define a language field */ cmap_info->language = 0xFFFFFFFFUL; return FT_Err_Ok; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,648
tt_cmap14_get_nondef_chars( TT_CMap cmap, FT_Byte *p, FT_Memory memory ) { TT_CMap14 cmap14 = (TT_CMap14) cmap; FT_UInt32 numMappings; FT_UInt i; FT_UInt32 *ret; numMappings = (FT_UInt32)TT_NEXT_ULONG( p ); if (...
DoS Overflow
0
tt_cmap14_get_nondef_chars( TT_CMap cmap, FT_Byte *p, FT_Memory memory ) { TT_CMap14 cmap14 = (TT_CMap14) cmap; FT_UInt32 numMappings; FT_UInt i; FT_UInt32 *ret; numMappings = (FT_UInt32)TT_NEXT_ULONG( p ); if (...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,649
tt_cmap14_init( TT_CMap14 cmap, FT_Byte* table ) { cmap->cmap.data = table; table += 6; cmap->num_selectors = FT_PEEK_ULONG( table ); cmap->max_results = 0; cmap->results = NULL; return FT_Err_Ok; }
DoS Overflow
0
tt_cmap14_init( TT_CMap14 cmap, FT_Byte* table ) { cmap->cmap.data = table; table += 6; cmap->num_selectors = FT_PEEK_ULONG( table ); cmap->max_results = 0; cmap->results = NULL; return FT_Err_Ok; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,650
tt_cmap14_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p; FT_ULong length; FT_ULong num_selectors; if ( table + 2 + 4 + 4 > valid->limit ) FT_INVALID_TOO_SHORT; p = table + 2; length = TT_NEXT_ULONG( p ); num_selecto...
DoS Overflow
0
tt_cmap14_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p; FT_ULong length; FT_ULong num_selectors; if ( table + 2 + 4 + 4 > valid->limit ) FT_INVALID_TOO_SHORT; p = table + 2; length = TT_NEXT_ULONG( p ); num_selecto...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,651
tt_cmap14_variants( TT_CMap cmap, FT_Memory memory ) { TT_CMap14 cmap14 = (TT_CMap14)cmap; FT_UInt32 count = cmap14->num_selectors; FT_Byte* p = cmap->data + 10; FT_UInt32* result; FT_UInt32 i; if ( tt_cmap14_ensure( cmap14, ( count + 1 ), memory )...
DoS Overflow
0
tt_cmap14_variants( TT_CMap cmap, FT_Memory memory ) { TT_CMap14 cmap14 = (TT_CMap14)cmap; FT_UInt32 count = cmap14->num_selectors; FT_Byte* p = cmap->data + 10; FT_UInt32* result; FT_UInt32 i; if ( tt_cmap14_ensure( cmap14, ( count + 1 ), memory )...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,652
tt_cmap8_get_info( TT_CMap cmap, TT_CMapInfo *cmap_info ) { FT_Byte* p = cmap->data + 8; cmap_info->format = 8; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); return FT_Err_Ok; }
DoS Overflow
0
tt_cmap8_get_info( TT_CMap cmap, TT_CMapInfo *cmap_info ) { FT_Byte* p = cmap->data + 8; cmap_info->format = 8; cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p ); return FT_Err_Ok; }
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,653
tt_cmap8_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p = table + 4; FT_Byte* is32; FT_UInt32 length; FT_UInt32 num_groups; if ( table + 16 + 8192 > valid->limit ) FT_INVALID_TOO_SHORT; length = TT_NEXT_ULONG( p ); if ( length > (FT_...
DoS Overflow
0
tt_cmap8_validate( FT_Byte* table, FT_Validator valid ) { FT_Byte* p = table + 4; FT_Byte* is32; FT_UInt32 length; FT_UInt32 num_groups; if ( table + 16 + 8192 > valid->limit ) FT_INVALID_TOO_SHORT; length = TT_NEXT_ULONG( p ); if ( length > (FT_...
@@ -845,9 +845,6 @@ p = table + 2; /* skip format */ length = TT_NEXT_USHORT( p ); - if ( length < 16 ) - FT_INVALID_TOO_SHORT; - /* in certain fonts, the `length' field is invalid and goes */ /* out of bound. We try to correct this here... */ if ( table + l...
CWE-119
null
null
5,654
T42_Open_Face( T42_Face face ) { T42_LoaderRec loader; T42_Parser parser; T1_Font type1 = &face->type1; FT_Memory memory = face->root.memory; FT_Error error; PSAux_Service psaux = (PSAux_Service)face->psaux; t42_loader_init( &loader, face ); parser = &lo...
DoS
0
T42_Open_Face( T42_Face face ) { T42_LoaderRec loader; T42_Parser parser; T1_Font type1 = &face->type1; FT_Memory memory = face->root.memory; FT_Error error; PSAux_Service psaux = (PSAux_Service)face->psaux; t42_loader_init( &loader, face ); parser = &lo...
@@ -292,7 +292,9 @@ FT_Open_Args args; - args.flags = FT_OPEN_MEMORY; + args.flags = FT_OPEN_MEMORY | FT_OPEN_DRIVER; + args.driver = FT_Get_Module( FT_FACE_LIBRARY( face ), + "truetype" ); args.memory_base = face->ttf_data; ...
null
null
null
5,655
T42_Driver_Done( FT_Module module ) { FT_UNUSED( module ); }
DoS
0
T42_Driver_Done( FT_Module module ) { FT_UNUSED( module ); }
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,656
T42_Driver_Init( FT_Module module ) /* T42_Driver */ { T42_Driver driver = (T42_Driver)module; FT_Module ttmodule; ttmodule = FT_Get_Module( module->library, "truetype" ); if ( !ttmodule ) { FT_ERROR(( "T42_Driver_Init: cannot access `truetype' module\n" )); return FT_TH...
DoS
0
T42_Driver_Init( FT_Module module ) /* T42_Driver */ { T42_Driver driver = (T42_Driver)module; FT_Module ttmodule; ttmodule = FT_Get_Module( module->library, "truetype" ); if ( !ttmodule ) { FT_ERROR(( "T42_Driver_Init: cannot access `truetype' module\n" )); return FT_TH...
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,657
T42_Face_Done( FT_Face t42face ) { T42_Face face = (T42_Face)t42face; T1_Font type1; PS_FontInfo info; FT_Memory memory; if ( !face ) return; type1 = &face->type1; info = &type1->font_info; memory = face->root.memory; /* delete internal ttf face prior t...
DoS
0
T42_Face_Done( FT_Face t42face ) { T42_Face face = (T42_Face)t42face; T1_Font type1; PS_FontInfo info; FT_Memory memory; if ( !face ) return; type1 = &face->type1; info = &type1->font_info; memory = face->root.memory; /* delete internal ttf face prior t...
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,658
T42_Face_Init( FT_Stream stream, FT_Face t42face, /* T42_Face */ FT_Int face_index, FT_Int num_params, FT_Parameter* params ) { T42_Face face = (T42_Face)t42face; FT_Error error; ...
DoS
0
T42_Face_Init( FT_Stream stream, FT_Face t42face, /* T42_Face */ FT_Int face_index, FT_Int num_params, FT_Parameter* params ) { T42_Face face = (T42_Face)t42face; FT_Error error; ...
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,659
T42_GlyphSlot_Done( FT_GlyphSlot t42slot ) /* T42_GlyphSlot */ { T42_GlyphSlot slot = (T42_GlyphSlot)t42slot; FT_Done_GlyphSlot( slot->ttslot ); }
DoS
0
T42_GlyphSlot_Done( FT_GlyphSlot t42slot ) /* T42_GlyphSlot */ { T42_GlyphSlot slot = (T42_GlyphSlot)t42slot; FT_Done_GlyphSlot( slot->ttslot ); }
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,660
T42_GlyphSlot_Init( FT_GlyphSlot t42slot ) /* T42_GlyphSlot */ { T42_GlyphSlot slot = (T42_GlyphSlot)t42slot; FT_Face face = t42slot->face; T42_Face t42face = (T42_Face)face; FT_GlyphSlot ttslot; FT_Error error = FT_Err_Ok; if ( face->glyph == NULL ) ...
DoS
0
T42_GlyphSlot_Init( FT_GlyphSlot t42slot ) /* T42_GlyphSlot */ { T42_GlyphSlot slot = (T42_GlyphSlot)t42slot; FT_Face face = t42slot->face; T42_Face t42face = (T42_Face)face; FT_GlyphSlot ttslot; FT_Error error = FT_Err_Ok; if ( face->glyph == NULL ) ...
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,661
T42_Size_Done( FT_Size t42size ) /* T42_Size */ { T42_Size size = (T42_Size)t42size; FT_Face face = t42size->face; T42_Face t42face = (T42_Face)face; FT_ListNode node; node = FT_List_Find( &t42face->ttf_face->sizes_list, size->ttsize ); if ( node ) { ...
DoS
0
T42_Size_Done( FT_Size t42size ) /* T42_Size */ { T42_Size size = (T42_Size)t42size; FT_Face face = t42size->face; T42_Face t42face = (T42_Face)face; FT_ListNode node; node = FT_List_Find( &t42face->ttf_face->sizes_list, size->ttsize ); if ( node ) { ...
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,662
T42_Size_Init( FT_Size size ) /* T42_Size */ { T42_Size t42size = (T42_Size)size; FT_Face face = size->face; T42_Face t42face = (T42_Face)face; FT_Size ttsize; FT_Error error; error = FT_New_Size( t42face->ttf_face, &ttsize ); t42size->ttsize = ttsize; FT_Activa...
DoS
0
T42_Size_Init( FT_Size size ) /* T42_Size */ { T42_Size t42size = (T42_Size)size; FT_Face face = size->face; T42_Face t42face = (T42_Face)face; FT_Size ttsize; FT_Error error; error = FT_New_Size( t42face->ttf_face, &ttsize ); t42size->ttsize = ttsize; FT_Activa...
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,663
T42_Size_Select( FT_Size t42size, /* T42_Size */ FT_ULong strike_index ) { T42_Size size = (T42_Size)t42size; T42_Face face = (T42_Face)t42size->face; FT_Error error; FT_Activate_Size( size->ttsize ); error = FT_Select_Size( face->ttf_face, (FT_Int)strike_inde...
DoS
0
T42_Size_Select( FT_Size t42size, /* T42_Size */ FT_ULong strike_index ) { T42_Size size = (T42_Size)t42size; T42_Face face = (T42_Face)t42size->face; FT_Error error; FT_Activate_Size( size->ttsize ); error = FT_Select_Size( face->ttf_face, (FT_Int)strike_inde...
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,664
t42_glyphslot_clear( FT_GlyphSlot slot ) { /* free bitmap if needed */ ft_glyphslot_free_bitmap( slot ); /* clear all public fields in the glyph slot */ FT_ZERO( &slot->metrics ); FT_ZERO( &slot->outline ); FT_ZERO( &slot->bitmap ); slot->bitmap_left = 0; slot->bitmap_top = 0...
DoS
0
t42_glyphslot_clear( FT_GlyphSlot slot ) { /* free bitmap if needed */ ft_glyphslot_free_bitmap( slot ); /* clear all public fields in the glyph slot */ FT_ZERO( &slot->metrics ); FT_ZERO( &slot->outline ); FT_ZERO( &slot->bitmap ); slot->bitmap_left = 0; slot->bitmap_top = 0...
@@ -47,6 +47,12 @@ if ( FT_ALLOC( face->ttf_data, 12 ) ) goto Exit; + /* while parsing the font we always update `face->ttf_size' so that */ + /* even in case of buggy data (which might lead to premature end of */ + /* scanning without causing an error) the call to `FT_Open_Face' in */ + /* `T...
null
null
null
5,665
_bdf_add_property( bdf_font_t* font, char* name, char* value, unsigned long lineno ) { size_t propid; hashnode hn; bdf_property_t *prop, *fp; FT_Memory memory = font->memory; FT_Error ...
DoS
0
_bdf_add_property( bdf_font_t* font, char* name, char* value, unsigned long lineno ) { size_t propid; hashnode hn; bdf_property_t *prop, *fp; FT_Memory memory = font->memory; FT_Error ...
@@ -1555,6 +1555,14 @@ /* Check for the ENDFONT field. */ if ( _bdf_strncmp( line, "ENDFONT", 7 ) == 0 ) { + if ( p->flags & _BDF_GLYPH_BITS ) + { + /* Missing ENDCHAR field. */ + FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" )); + error = FT_THROW( Corrupted_...
CWE-476
null
null
5,666
_bdf_list_ensure( _bdf_list_t* list, unsigned long num_items ) /* same as _bdf_list_t.used */ { FT_Error error = FT_Err_Ok; if ( num_items > list->size ) { unsigned long oldsize = list->size; /* same as _bdf_list_t.size */ unsigned long newsize = oldsize + ( oldsi...
DoS
0
_bdf_list_ensure( _bdf_list_t* list, unsigned long num_items ) /* same as _bdf_list_t.used */ { FT_Error error = FT_Err_Ok; if ( num_items > list->size ) { unsigned long oldsize = list->size; /* same as _bdf_list_t.size */ unsigned long newsize = oldsize + ( oldsi...
@@ -1555,6 +1555,14 @@ /* Check for the ENDFONT field. */ if ( _bdf_strncmp( line, "ENDFONT", 7 ) == 0 ) { + if ( p->flags & _BDF_GLYPH_BITS ) + { + /* Missing ENDCHAR field. */ + FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" )); + error = FT_THROW( Corrupted_...
CWE-476
null
null
5,667
_bdf_list_join( _bdf_list_t* list, int c, unsigned long *alen ) { unsigned long i, j; char* dp; *alen = 0; if ( list == 0 || list->used == 0 ) return 0; dp = list->field[0]; for ( i = j = 0; i < list->used; i++ ) { ...
DoS
0
_bdf_list_join( _bdf_list_t* list, int c, unsigned long *alen ) { unsigned long i, j; char* dp; *alen = 0; if ( list == 0 || list->used == 0 ) return 0; dp = list->field[0]; for ( i = j = 0; i < list->used; i++ ) { ...
@@ -1555,6 +1555,14 @@ /* Check for the ENDFONT field. */ if ( _bdf_strncmp( line, "ENDFONT", 7 ) == 0 ) { + if ( p->flags & _BDF_GLYPH_BITS ) + { + /* Missing ENDCHAR field. */ + FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" )); + error = FT_THROW( Corrupted_...
CWE-476
null
null
5,668
_bdf_list_split( _bdf_list_t* list, char* separators, char* line, unsigned long linelen ) { int mult, final_empty; char *sp, *ep, *end; char seps[32]; FT_Error error = FT_Err_Ok; /* Initialize the li...
DoS
0
_bdf_list_split( _bdf_list_t* list, char* separators, char* line, unsigned long linelen ) { int mult, final_empty; char *sp, *ep, *end; char seps[32]; FT_Error error = FT_Err_Ok; /* Initialize the li...
@@ -1555,6 +1555,14 @@ /* Check for the ENDFONT field. */ if ( _bdf_strncmp( line, "ENDFONT", 7 ) == 0 ) { + if ( p->flags & _BDF_GLYPH_BITS ) + { + /* Missing ENDCHAR field. */ + FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG1, lineno, "ENDCHAR" )); + error = FT_THROW( Corrupted_...
CWE-476
null
null
5,669
cf2_getWindingMomentum( CF2_Fixed x1, CF2_Fixed y1, CF2_Fixed x2, CF2_Fixed y2 ) { /* cross product of pt1 position from origin with pt2 position from */ /* pt1; we reduce the precision so that the result fits into 32 bits */...
DoS Exec Code Overflow
0
cf2_getWindingMomentum( CF2_Fixed x1, CF2_Fixed y1, CF2_Fixed x2, CF2_Fixed y2 ) { /* cross product of pt1 position from origin with pt2 position from */ /* pt1; we reduce the precision so that the result fits into 32 bits */...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,670
cf2_glyphpath_closeOpenPath( CF2_GlyphPath glyphpath ) { if ( glyphpath->pathIsOpen ) { /* * A closing line in Character Space line is always generated below * with `cf2_glyphPath_lineTo'. It may be ignored later if it turns * out to be zero length in Device Space. */ ...
DoS Exec Code Overflow
0
cf2_glyphpath_closeOpenPath( CF2_GlyphPath glyphpath ) { if ( glyphpath->pathIsOpen ) { /* * A closing line in Character Space line is always generated below * with `cf2_glyphPath_lineTo'. It may be ignored later if it turns * out to be zero length in Device Space. */ ...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,671
cf2_glyphpath_computeOffset( CF2_GlyphPath glyphpath, CF2_Fixed x1, CF2_Fixed y1, CF2_Fixed x2, CF2_Fixed y2, CF2_Fixed* x, ...
DoS Exec Code Overflow
0
cf2_glyphpath_computeOffset( CF2_GlyphPath glyphpath, CF2_Fixed x1, CF2_Fixed y1, CF2_Fixed x2, CF2_Fixed y2, CF2_Fixed* x, ...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,672
cf2_glyphpath_curveTo( CF2_GlyphPath glyphpath, CF2_Fixed x1, CF2_Fixed y1, CF2_Fixed x2, CF2_Fixed y2, CF2_Fixed x3, CF2_Fixed y3 ) { ...
DoS Exec Code Overflow
0
cf2_glyphpath_curveTo( CF2_GlyphPath glyphpath, CF2_Fixed x1, CF2_Fixed y1, CF2_Fixed x2, CF2_Fixed y2, CF2_Fixed x3, CF2_Fixed y3 ) { ...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,673
cf2_glyphpath_finalize( CF2_GlyphPath glyphpath ) { cf2_arrstack_finalize( &glyphpath->hintMoves ); }
DoS Exec Code Overflow
0
cf2_glyphpath_finalize( CF2_GlyphPath glyphpath ) { cf2_arrstack_finalize( &glyphpath->hintMoves ); }
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,674
cf2_glyphpath_hintPoint( CF2_GlyphPath glyphpath, CF2_HintMap hintmap, FT_Vector* ppt, CF2_Fixed x, CF2_Fixed y ) { FT_Vector pt; /* hinted point in upright DS */ pt.x = FT_MulF...
DoS Exec Code Overflow
0
cf2_glyphpath_hintPoint( CF2_GlyphPath glyphpath, CF2_HintMap hintmap, FT_Vector* ppt, CF2_Fixed x, CF2_Fixed y ) { FT_Vector pt; /* hinted point in upright DS */ pt.x = FT_MulF...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,675
cf2_glyphpath_lineTo( CF2_GlyphPath glyphpath, CF2_Fixed x, CF2_Fixed y ) { CF2_Fixed xOffset, yOffset; FT_Vector P0, P1; FT_Bool newHintMap; /* * New hints will be applied after cf2_glyphpath_pushPrevElem has run. * In case ...
DoS Exec Code Overflow
0
cf2_glyphpath_lineTo( CF2_GlyphPath glyphpath, CF2_Fixed x, CF2_Fixed y ) { CF2_Fixed xOffset, yOffset; FT_Vector P0, P1; FT_Bool newHintMap; /* * New hints will be applied after cf2_glyphpath_pushPrevElem has run. * In case ...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,676
cf2_glyphpath_moveTo( CF2_GlyphPath glyphpath, CF2_Fixed x, CF2_Fixed y ) { cf2_glyphpath_closeOpenPath( glyphpath ); /* save the parameters of the move for later, when we'll know how to */ /* offset it; ...
DoS Exec Code Overflow
0
cf2_glyphpath_moveTo( CF2_GlyphPath glyphpath, CF2_Fixed x, CF2_Fixed y ) { cf2_glyphpath_closeOpenPath( glyphpath ); /* save the parameters of the move for later, when we'll know how to */ /* offset it; ...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,677
cf2_glyphpath_pushMove( CF2_GlyphPath glyphpath, FT_Vector start ) { CF2_CallbackParamsRec params; params.op = CF2_PathOpMoveTo; params.pt0 = glyphpath->currentDS; /* Test if move has really happened yet; it would have called */ /* `cf2_hintmap_build' to set ...
DoS Exec Code Overflow
0
cf2_glyphpath_pushMove( CF2_GlyphPath glyphpath, FT_Vector start ) { CF2_CallbackParamsRec params; params.op = CF2_PathOpMoveTo; params.pt0 = glyphpath->currentDS; /* Test if move has really happened yet; it would have called */ /* `cf2_hintmap_build' to set ...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,678
cf2_glyphpath_pushPrevElem( CF2_GlyphPath glyphpath, CF2_HintMap hintmap, FT_Vector* nextP0, FT_Vector nextP1, FT_Bool close ) { CF2_CallbackParamsRec params; FT_Vect...
DoS Exec Code Overflow
0
cf2_glyphpath_pushPrevElem( CF2_GlyphPath glyphpath, CF2_HintMap hintmap, FT_Vector* nextP0, FT_Vector nextP1, FT_Bool close ) { CF2_CallbackParamsRec params; FT_Vect...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,679
cf2_hint_isBottom( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & ( CF2_PairBottom | CF2_GhostBottom ) ) != 0 ); }
DoS Exec Code Overflow
0
cf2_hint_isBottom( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & ( CF2_PairBottom | CF2_GhostBottom ) ) != 0 ); }
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,680
cf2_hint_isLocked( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & CF2_Locked ) != 0 ); }
DoS Exec Code Overflow
0
cf2_hint_isLocked( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & CF2_Locked ) != 0 ); }
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,681
cf2_hint_isPair( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & ( CF2_PairBottom | CF2_PairTop ) ) != 0 ); }
DoS Exec Code Overflow
0
cf2_hint_isPair( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & ( CF2_PairBottom | CF2_PairTop ) ) != 0 ); }
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,682
cf2_hint_isPairTop( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & CF2_PairTop ) != 0 ); }
DoS Exec Code Overflow
0
cf2_hint_isPairTop( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & CF2_PairTop ) != 0 ); }
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,683
cf2_hint_isSynthetic( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & CF2_Synthetic ) != 0 ); }
DoS Exec Code Overflow
0
cf2_hint_isSynthetic( const CF2_Hint hint ) { return (FT_Bool)( ( hint->flags & CF2_Synthetic ) != 0 ); }
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,684
cf2_hint_lock( CF2_Hint hint ) { hint->flags |= CF2_Locked; }
DoS Exec Code Overflow
0
cf2_hint_lock( CF2_Hint hint ) { hint->flags |= CF2_Locked; }
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,685
cf2_hintmap_adjustHints( CF2_HintMap hintmap ) { size_t i, j; cf2_arrstack_clear( hintmap->hintMoves ); /* working storage */ /* * First pass is bottom-up (font hint order) without look-ahead. * Locked edges are already adjusted. * Unlocked edges begin with dsCoord from `initial...
DoS Exec Code Overflow
0
cf2_hintmap_adjustHints( CF2_HintMap hintmap ) { size_t i, j; cf2_arrstack_clear( hintmap->hintMoves ); /* working storage */ /* * First pass is bottom-up (font hint order) without look-ahead. * Locked edges are already adjusted. * Unlocked edges begin with dsCoord from `initial...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,686
cf2_hintmap_init( CF2_HintMap hintmap, CF2_Font font, CF2_HintMap initialMap, CF2_ArrStack hintMoves, CF2_Fixed scale ) { FT_ZERO( hintmap ); /* copy parameters from font instance */ hintmap->hinted = ...
DoS Exec Code Overflow
0
cf2_hintmap_init( CF2_HintMap hintmap, CF2_Font font, CF2_HintMap initialMap, CF2_ArrStack hintMoves, CF2_Fixed scale ) { FT_ZERO( hintmap ); /* copy parameters from font instance */ hintmap->hinted = ...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,687
cf2_hintmap_insertHint( CF2_HintMap hintmap, CF2_Hint bottomHintEdge, CF2_Hint topHintEdge ) { CF2_UInt indexInsert; /* set default values, then check for edge hints */ FT_Bool isPair = TRUE; CF2_Hint firstHintEdge = bottomHi...
DoS Exec Code Overflow
0
cf2_hintmap_insertHint( CF2_HintMap hintmap, CF2_Hint bottomHintEdge, CF2_Hint topHintEdge ) { CF2_UInt indexInsert; /* set default values, then check for edge hints */ FT_Bool isPair = TRUE; CF2_Hint firstHintEdge = bottomHi...
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,688
cf2_hintmap_isValid( const CF2_HintMap hintmap ) { return hintmap->isValid; }
DoS Exec Code Overflow
0
cf2_hintmap_isValid( const CF2_HintMap hintmap ) { return hintmap->isValid; }
@@ -794,9 +794,12 @@ maskPtr = cf2_hintmask_getMaskPtr( &tempHintMask ); /* use the hStem hints only, which are first in the mask */ - /* TODO: compare this to cffhintmaskGetBitCount */ bitCount = cf2_arrstack_size( hStemHintArray ); + /* Defense-in-depth. Should never return here. */ + ...
CWE-119
null
null
5,689
cf2_doFlex( CF2_Stack opStack, CF2_Fixed* curX, CF2_Fixed* curY, CF2_GlyphPath glyphPath, const FT_Bool* readFromStack, FT_Bool doConditionalLastRead ) { CF2_Fixed vals[14]; CF2_UInt index; FT_Bool isH...
DoS Exec Code Overflow
0
cf2_doFlex( CF2_Stack opStack, CF2_Fixed* curX, CF2_Fixed* curY, CF2_GlyphPath glyphPath, const FT_Bool* readFromStack, FT_Bool doConditionalLastRead ) { CF2_Fixed vals[14]; CF2_UInt index; FT_Bool isH...
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,690
cf2_hintmask_getMaskPtr( CF2_HintMask hintmask ) { return hintmask->mask; }
DoS Exec Code Overflow
0
cf2_hintmask_getMaskPtr( CF2_HintMask hintmask ) { return hintmask->mask; }
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,691
cf2_hintmask_init( CF2_HintMask hintmask, FT_Error* error ) { FT_ZERO( hintmask ); hintmask->error = error; }
DoS Exec Code Overflow
0
cf2_hintmask_init( CF2_HintMask hintmask, FT_Error* error ) { FT_ZERO( hintmask ); hintmask->error = error; }
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,692
cf2_hintmask_isNew( const CF2_HintMask hintmask ) { return hintmask->isNew; }
DoS Exec Code Overflow
0
cf2_hintmask_isNew( const CF2_HintMask hintmask ) { return hintmask->isNew; }
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,693
cf2_hintmask_isValid( const CF2_HintMask hintmask ) { return hintmask->isValid; }
DoS Exec Code Overflow
0
cf2_hintmask_isValid( const CF2_HintMask hintmask ) { return hintmask->isValid; }
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,694
cf2_hintmask_read( CF2_HintMask hintmask, CF2_Buffer charstring, size_t bitCount ) { size_t i; #ifndef CF2_NDEBUG /* these are the bits in the final mask byte that should be zero */ /* Note: this variable is only used in an assert expression below ...
DoS Exec Code Overflow
0
cf2_hintmask_read( CF2_HintMask hintmask, CF2_Buffer charstring, size_t bitCount ) { size_t i; #ifndef CF2_NDEBUG /* these are the bits in the final mask byte that should be zero */ /* Note: this variable is only used in an assert expression below ...
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,695
cf2_hintmask_setAll( CF2_HintMask hintmask, size_t bitCount ) { size_t i; CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1; /* initialize counts and isValid */ if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 ) return; FT_ASSERT( hintmask-...
DoS Exec Code Overflow
0
cf2_hintmask_setAll( CF2_HintMask hintmask, size_t bitCount ) { size_t i; CF2_UInt mask = ( 1 << ( -(CF2_Int)bitCount & 7 ) ) - 1; /* initialize counts and isValid */ if ( cf2_hintmask_setCounts( hintmask, bitCount ) == 0 ) return; FT_ASSERT( hintmask-...
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,696
cf2_hintmask_setCounts( CF2_HintMask hintmask, size_t bitCount ) { if ( bitCount > CF2_MAX_HINTS ) { /* total of h and v stems must be <= 96 */ CF2_SET_ERROR( hintmask->error, Invalid_Glyph_Format ); return 0; } hintmask->bitCount = bitCount; ...
DoS Exec Code Overflow
0
cf2_hintmask_setCounts( CF2_HintMask hintmask, size_t bitCount ) { if ( bitCount > CF2_MAX_HINTS ) { /* total of h and v stems must be <= 96 */ CF2_SET_ERROR( hintmask->error, Invalid_Glyph_Format ); return 0; } hintmask->bitCount = bitCount; ...
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,697
cf2_hintmask_setNew( CF2_HintMask hintmask, FT_Bool val ) { hintmask->isNew = val; }
DoS Exec Code Overflow
0
cf2_hintmask_setNew( CF2_HintMask hintmask, FT_Bool val ) { hintmask->isNew = val; }
@@ -4,7 +4,7 @@ /* */ /* Adobe's CFF Interpreter (body). */ /* */ -/* Copyright 2007-2013 Adobe Systems Incorporated. ...
CWE-119
null
null
5,698
tt_face_done_kern( TT_Face face ) { FT_Stream stream = face->root.stream; FT_FRAME_RELEASE( face->kern_table ); face->kern_table_size = 0; face->num_kern_tables = 0; face->kern_avail_bits = 0; face->kern_order_bits = 0; }
DoS
0
tt_face_done_kern( TT_Face face ) { FT_Stream stream = face->root.stream; FT_FRAME_RELEASE( face->kern_table ); face->kern_table_size = 0; face->num_kern_tables = 0; face->kern_avail_bits = 0; face->kern_order_bits = 0; }
@@ -99,7 +99,7 @@ length = FT_NEXT_USHORT( p ); coverage = FT_NEXT_USHORT( p ); - if ( length <= 6 ) + if ( length <= 6 + 8 ) break; p_next += length;
CWE-125
null
null
5,699
tt_face_done_loca( TT_Face face ) { FT_Stream stream = face->root.stream; FT_FRAME_RELEASE( face->glyph_locations ); face->num_locations = 0; }
DoS
0
tt_face_done_loca( TT_Face face ) { FT_Stream stream = face->root.stream; FT_FRAME_RELEASE( face->glyph_locations ); face->num_locations = 0; }
@@ -508,9 +508,9 @@ record_size = FT_NEXT_ULONG( p ); /* The maximum number of bytes in an hdmx device record is the */ - /* maximum number of glyphs + 2; this is 0xFFFF + 2; this is */ - /* the reason why `record_size' is a long (which we read as */ - /* unsigned long for convenience). In pr...
CWE-125
null
null