Commit b003b3e7b567a48f226080149971f2fbb33dc710

Werner Lemberg 2007-07-08T07:13:12

* src/base/ftglyph.c (FT_Glyph_Copy): Fix initialization of `target'. Reported by Sean McBride.

diff --git a/ChangeLog b/ChangeLog
index 8fc5ba7..e4af514 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-07-07  Werner Lemberg  <wl@gnu.org>
+
+	* src/base/ftglyph.c (FT_Glyph_Copy): Fix initialization of
+	`target'.  Reported by Sean McBride.
+
 2007-07-06  Werner Lemberg  <wl@gnu.org>
 
 	* src/pfr/pfrcmap.c: Include pfrerror.h.
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 969c5db..db0e79f 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -376,10 +376,16 @@
     const FT_Glyph_Class*  clazz;
 
 
+    /* check arguments */
+    if ( !target )
+    {
+      error = FT_Err_Invalid_Argument;
+      goto Exit;
+    }
+
     *target = 0;
 
-    /* check arguments */
-    if ( !target || !source || !source->clazz )
+    if ( !source || !source->clazz )
     {
       error = FT_Err_Invalid_Argument;
       goto Exit;