diff options
author | marha <marha@users.sourceforge.net> | 2011-01-16 17:43:39 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-01-16 17:43:39 +0000 |
commit | 2177eb8fad173f2b0fe04f188c4d6dadaa8f4441 (patch) | |
tree | 862ef4b348586f932593a7d2b599913230059cdd /freetype/src/winfonts | |
parent | 367c91bebcdc1f5ba4278b68eb8715218d9640ad (diff) | |
download | vcxsrv-2177eb8fad173f2b0fe04f188c4d6dadaa8f4441.tar.gz vcxsrv-2177eb8fad173f2b0fe04f188c4d6dadaa8f4441.tar.bz2 vcxsrv-2177eb8fad173f2b0fe04f188c4d6dadaa8f4441.zip |
freetype 2.4.4
Diffstat (limited to 'freetype/src/winfonts')
-rw-r--r-- | freetype/src/winfonts/winfnt.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/freetype/src/winfonts/winfnt.c b/freetype/src/winfonts/winfnt.c index 2df9af976..ee17d1665 100644 --- a/freetype/src/winfonts/winfnt.c +++ b/freetype/src/winfonts/winfnt.c @@ -4,7 +4,7 @@ /* */ /* FreeType font driver for Windows FNT/FON files */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* Copyright 2003 Huw D M Davies for Codeweavers */ /* Copyright 2007 Dmitry Timoshkov for Codeweavers */ @@ -944,7 +944,7 @@ FT_Int32 load_flags ) { FNT_Face face = (FNT_Face)FT_SIZE_FACE( size ); - FNT_Font font = face->font; + FNT_Font font; FT_Error error = FNT_Err_Ok; FT_Byte* p; FT_Int len; @@ -955,7 +955,15 @@ FT_UNUSED( load_flags ); - if ( !face || !font || + if ( !face ) + { + error = FNT_Err_Invalid_Argument; + goto Exit; + } + + font = face->font; + + if ( !font || glyph_index >= (FT_UInt)( FT_FACE( face )->num_glyphs ) ) { error = FNT_Err_Invalid_Argument; |