summaryrefslogtreecommitdiffstats
path: root/src/base/ftadvanc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/ftadvanc.c')
-rw-r--r--src/base/ftadvanc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/base/ftadvanc.c b/src/base/ftadvanc.c
index 5207847..f12908f 100644
--- a/src/base/ftadvanc.c
+++ b/src/base/ftadvanc.c
@@ -4,7 +4,7 @@
/* */
/* Quick computation of advance widths (body). */
/* */
-/* Copyright 2008, 2009, 2011, 2013 by */
+/* Copyright 2008-2015 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -80,6 +80,9 @@
if ( !face )
return FT_THROW( Invalid_Face_Handle );
+ if ( !padvance )
+ return FT_THROW( Invalid_Argument );
+
if ( gindex >= (FT_UInt)face->num_glyphs )
return FT_THROW( Invalid_Glyph_Index );
@@ -118,6 +121,9 @@
if ( !face )
return FT_THROW( Invalid_Face_Handle );
+ if ( !padvances )
+ return FT_THROW( Invalid_Argument );
+
num = (FT_UInt)face->num_glyphs;
end = start + count;
if ( start >= num || end < start || end > num )