Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
44b1ebe5
by Alexei Podtelezhnikov at 2021-04-22T22:34:05-04:00
4 changed files:
Changes:
1 |
+2021-04-20 Alexei Podtelezhnikov <apodtele@gmail.com>
|
|
2 |
+ |
|
3 |
+ [base] s/FT_ALLOC/FT_QALLOC/ for initialized buffers.
|
|
4 |
+ |
|
5 |
+ * src/base/ftobjs.c (open_face_PS_from_sfnt_stream,
|
|
6 |
+ Mac_Read_sfnt_Resource): Do not zero out the buffer.
|
|
7 |
+ * src/base/ftmac.c (FT_New_Face_From_SFNT, read_lwfn): Ditto.
|
|
8 |
+ * src/base/ftrfork.c (raccess_make_file_name,
|
|
9 |
+ raccess_guess_darwin_hfsplus, raccess_guess_darwin_newvfs): Ditto.
|
|
10 |
+ |
|
1 | 11 |
2021-04-20 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2 | 12 |
|
3 | 13 |
[cache] Restore SBit copying for unowned (BDF) bitmaps.
|
... | ... | @@ -631,7 +631,7 @@ |
631 | 631 |
old_total_size = total_size;
|
632 | 632 |
}
|
633 | 633 |
|
634 |
- if ( FT_ALLOC( buffer, (FT_Long)total_size ) )
|
|
634 |
+ if ( FT_QALLOC( buffer, (FT_Long)total_size ) )
|
|
635 | 635 |
goto Error;
|
636 | 636 |
|
637 | 637 |
/* Second pass: append all POST data to the buffer, add PFB fields. */
|
... | ... | @@ -752,7 +752,7 @@ |
752 | 752 |
if ( FT_MAC_RFORK_MAX_LEN < sfnt_size )
|
753 | 753 |
return FT_THROW( Array_Too_Large );
|
754 | 754 |
|
755 |
- if ( FT_ALLOC( sfnt_data, (FT_Long)sfnt_size ) )
|
|
755 |
+ if ( FT_QALLOC( sfnt_data, (FT_Long)sfnt_size ) )
|
|
756 | 756 |
{
|
757 | 757 |
ReleaseResource( sfnt );
|
758 | 758 |
return error;
|
... | ... | @@ -1818,7 +1818,7 @@ |
1818 | 1818 |
if ( error )
|
1819 | 1819 |
goto Exit;
|
1820 | 1820 |
|
1821 |
- if ( FT_ALLOC( sfnt_ps, (FT_Long)length ) )
|
|
1821 |
+ if ( FT_QALLOC( sfnt_ps, (FT_Long)length ) )
|
|
1822 | 1822 |
goto Exit;
|
1823 | 1823 |
|
1824 | 1824 |
error = FT_Stream_Read( stream, (FT_Byte *)sfnt_ps, length );
|
... | ... | @@ -2128,7 +2128,7 @@ |
2128 | 2128 |
if ( error )
|
2129 | 2129 |
goto Exit;
|
2130 | 2130 |
|
2131 |
- if ( FT_ALLOC( sfnt_data, rlen ) )
|
|
2131 |
+ if ( FT_QALLOC( sfnt_data, rlen ) )
|
|
2132 | 2132 |
return error;
|
2133 | 2133 |
error = FT_Stream_Read( stream, (FT_Byte *)sfnt_data, (FT_ULong)rlen );
|
2134 | 2134 |
if ( error ) {
|
... | ... | @@ -602,7 +602,7 @@ |
602 | 602 |
if ( base_file_len + 6 > FT_INT_MAX )
|
603 | 603 |
return FT_THROW( Array_Too_Large );
|
604 | 604 |
|
605 |
- if ( FT_ALLOC( newpath, base_file_len + 6 ) )
|
|
605 |
+ if ( FT_QALLOC( newpath, base_file_len + 6 ) )
|
|
606 | 606 |
return error;
|
607 | 607 |
|
608 | 608 |
FT_MEM_COPY( newpath, base_file_name, base_file_len );
|
... | ... | @@ -638,7 +638,7 @@ |
638 | 638 |
if ( base_file_len + 18 > FT_INT_MAX )
|
639 | 639 |
return FT_THROW( Array_Too_Large );
|
640 | 640 |
|
641 |
- if ( FT_ALLOC( newpath, base_file_len + 18 ) )
|
|
641 |
+ if ( FT_QALLOC( newpath, base_file_len + 18 ) )
|
|
642 | 642 |
return error;
|
643 | 643 |
|
644 | 644 |
FT_MEM_COPY( newpath, base_file_name, base_file_len );
|
... | ... | @@ -874,7 +874,7 @@ |
874 | 874 |
|
875 | 875 |
|
876 | 876 |
new_length = ft_strlen( original_name ) + ft_strlen( insertion );
|
877 |
- if ( FT_ALLOC( new_name, new_length + 1 ) )
|
|
877 |
+ if ( FT_QALLOC( new_name, new_length + 1 ) )
|
|
878 | 878 |
return NULL;
|
879 | 879 |
|
880 | 880 |
tmp = ft_strrchr( original_name, '/' );
|