forked from minhngoc25a/freetype2
[truetype] Fix deallocation in case of error (#47726).
* src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in `outline' that are going to be deallocated in case of error.
This commit is contained in:
parent
80afef8bd6
commit
432e00db2e
|
@ -1,3 +1,10 @@
|
|||
2016-04-24 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[truetype] Fix deallocation in case of error (#47726).
|
||||
|
||||
* src/truetype/ttgload.c (load_truetype_glyph): Initialize fields in
|
||||
`outline' that are going to be deallocated in case of error.
|
||||
|
||||
2016-04-23 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] Improve Georgian blue zone characters.
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
|
||||
static
|
||||
const FT_Outline null_outline = { 0, 0, 0, 0, 0, 0 };
|
||||
const FT_Outline null_outline = { 0, 0, NULL, NULL, NULL, 0 };
|
||||
|
||||
|
||||
/* documentation is in ftoutln.h */
|
||||
|
|
|
@ -1704,6 +1704,9 @@
|
|||
outline.n_points = (short)( gloader->current.num_subglyphs + 4 );
|
||||
outline.n_contours = outline.n_points;
|
||||
|
||||
outline.tags = NULL;
|
||||
outline.contours = NULL;
|
||||
|
||||
if ( FT_NEW_ARRAY( points, outline.n_points ) ||
|
||||
FT_NEW_ARRAY( tags, outline.n_points ) ||
|
||||
FT_NEW_ARRAY( contours, outline.n_points ) )
|
||||
|
|
Loading…
Reference in New Issue