shithub: freetype+ttf2subf

Download patch

ref: 45bb18fc7b8d9afa23fefa7b24e4c794594df32b
parent: fcc1f472c3ace3a5c4b8ac39b3bb5622d71f9570
author: Werner Lemberg <[email protected]>
date: Thu Apr 26 02:26:35 EDT 2007

* src/base/ftglyph.c (FT_Glyph_Copy): Always set second argument to
zero in case of error.  This fixes Savannah bug #19689.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-26  Werner Lemberg  <[email protected]>
+
+	* src/base/ftglyph.c (FT_Glyph_Copy): Always set second argument to
+	zero in case of error.  This fixes Savannah bug #19689.
+
 2007-04-10  Martin Horak  <[email protected]>
 
 	* src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]:
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType convenience functions to handle glyphs (body).              */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005 by                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2007 by                   */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -376,6 +376,8 @@
     const FT_Glyph_Class*  clazz;
 
 
+    *target = 0;
+
     /* check arguments */
     if ( !target || !source || !source->clazz )
     {
@@ -382,8 +384,6 @@
       error = FT_Err_Invalid_Argument;
       goto Exit;
     }
-
-    *target = 0;
 
     clazz = source->clazz;
     error = ft_new_glyph( source->library, clazz, &copy );