[sfnt, winfonts] Avoid memory leaks in case of error (#56587).
* src/sfnt/sfwoff.c (woff_open_font): Call `FT_FRAME_EXIT' in case of error. * src/winfonts/winfnt.c (fnt_face_get_dll_font): Ditto.
This commit is contained in:
parent
12e4307dc7
commit
b110acba9e
|
@ -1,3 +1,12 @@
|
||||||
|
2019-07-12 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[sfnt, winfonts] Avoid memory leaks in case of error (#56587).
|
||||||
|
|
||||||
|
* src/sfnt/sfwoff.c (woff_open_font): Call `FT_FRAME_EXIT' in case
|
||||||
|
of error.
|
||||||
|
|
||||||
|
* src/winfonts/winfnt.c (fnt_face_get_dll_font): Ditto.
|
||||||
|
|
||||||
2019-07-12 Ben Wagner <bungeman@google.com>
|
2019-07-12 Ben Wagner <bungeman@google.com>
|
||||||
|
|
||||||
Properly handle phantom points for variation fonts (#56601).
|
Properly handle phantom points for variation fonts (#56601).
|
||||||
|
|
|
@ -371,18 +371,18 @@
|
||||||
sfnt + table->OrigOffset, &output_len,
|
sfnt + table->OrigOffset, &output_len,
|
||||||
stream->cursor, table->CompLength );
|
stream->cursor, table->CompLength );
|
||||||
if ( error )
|
if ( error )
|
||||||
goto Exit;
|
goto Exit1;
|
||||||
if ( output_len != table->OrigLength )
|
if ( output_len != table->OrigLength )
|
||||||
{
|
{
|
||||||
FT_ERROR(( "woff_font_open: compressed table length mismatch\n" ));
|
FT_ERROR(( "woff_font_open: compressed table length mismatch\n" ));
|
||||||
error = FT_THROW( Invalid_Table );
|
error = FT_THROW( Invalid_Table );
|
||||||
goto Exit;
|
goto Exit1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !FT_CONFIG_OPTION_USE_ZLIB */
|
#else /* !FT_CONFIG_OPTION_USE_ZLIB */
|
||||||
|
|
||||||
error = FT_THROW( Unimplemented_Feature );
|
error = FT_THROW( Unimplemented_Feature );
|
||||||
goto Exit;
|
goto Exit1;
|
||||||
|
|
||||||
#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
|
#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
|
||||||
}
|
}
|
||||||
|
@ -424,6 +424,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
Exit1:
|
||||||
|
FT_FRAME_EXIT();
|
||||||
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -331,7 +331,7 @@
|
||||||
{
|
{
|
||||||
FT_TRACE2(( "invalid alignment shift count for resource data\n" ));
|
FT_TRACE2(( "invalid alignment shift count for resource data\n" ));
|
||||||
error = FT_THROW( Invalid_File_Format );
|
error = FT_THROW( Invalid_File_Format );
|
||||||
goto Exit;
|
goto Exit1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -597,6 +597,10 @@
|
||||||
|
|
||||||
Exit:
|
Exit:
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
|
Exit1:
|
||||||
|
FT_FRAME_EXIT();
|
||||||
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue