diff options
author | vng <viktor.govako@gmail.com> | 2011-08-31 12:59:55 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:22:47 +0300 |
commit | 718fd2960ee25ff545a3e7c638583a7e3e17af68 (patch) | |
tree | f1558c708cb0aec68a5c685f84021f33cf5acf7f /3party/freetype | |
parent | c41ac364405f62ef72beff5bd4ae3620dcbe8d19 (diff) |
Fix 'ft_stroke_border_close' bug if FreeType.
Diffstat (limited to '3party/freetype')
-rw-r--r-- | 3party/freetype/src/base/ftstroke.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/3party/freetype/src/base/ftstroke.c b/3party/freetype/src/base/ftstroke.c index 3f24f9ee84..400538fda5 100644 --- a/3party/freetype/src/base/ftstroke.c +++ b/3party/freetype/src/base/ftstroke.c @@ -2222,9 +2222,14 @@ if ( error ) goto Exit; - error = FT_Stroker_EndSubPath( stroker ); - if ( error ) - goto Exit; + // By VNG: http://old.nabble.com/Re%3A--bug--33992--heap-underflow-in-ft_stroke_border_close-td32265105.html + /* don't try to end the path if no segments have been generated */ + if ( !stroker->first_point ) + { + error = FT_Stroker_EndSubPath( stroker ); + if ( error ) + goto Exit; + } first = last + 1; } |