aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/winfonts
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-16 19:26:40 +0000
committermarha <marha@users.sourceforge.net>2011-01-16 19:26:40 +0000
commit4e370208d0f941a4cceb6f9fefa78444c2bf3498 (patch)
tree543c693b5dee03c965b0c9ef79869a8536024432 /freetype/src/winfonts
parent1eaf4b3f1d746b054298358d81233364bb1b7ba2 (diff)
parent2177eb8fad173f2b0fe04f188c4d6dadaa8f4441 (diff)
downloadvcxsrv-4e370208d0f941a4cceb6f9fefa78444c2bf3498.tar.gz
vcxsrv-4e370208d0f941a4cceb6f9fefa78444c2bf3498.tar.bz2
vcxsrv-4e370208d0f941a4cceb6f9fefa78444c2bf3498.zip
svn merge ^/branches/released .
Diffstat (limited to 'freetype/src/winfonts')
-rw-r--r--freetype/src/winfonts/winfnt.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/freetype/src/winfonts/winfnt.c b/freetype/src/winfonts/winfnt.c
index 42c685f8d..9be08e8be 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;