* src/base/ftglyph.c (FT_Glyph_Copy): Always set second argument to zero in case of error. This fixes Savannah bug #19689.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
diff --git a/ChangeLog b/ChangeLog
index ae0f9f8..7769632 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-26 Werner Lemberg <wl@gnu.org>
+
+ * 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 <horakm@centrum.cz>
* src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]:
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index af0eadf..969c5db 100644
--- 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 )
{
@@ -383,8 +385,6 @@
goto Exit;
}
- *target = 0;
-
clazz = source->clazz;
error = ft_new_glyph( source->library, clazz, © );
if ( error )