From 45bb18fc7b8d9afa23fefa7b24e4c794594df32b Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 26 Apr 2007 06:26:35 +0000 Subject: [PATCH] * src/base/ftglyph.c (FT_Glyph_Copy): Always set second argument to zero in case of error. This fixes Savannah bug #19689. --- ChangeLog | 5 +++++ src/base/ftglyph.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae0f9f8b1..77696326a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-04-26 Werner Lemberg + + * 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 * src/sfnt/sfobjs.c (sfnt_load_face) [FT_CONFIG_OPTION_INCREMENTAL]: diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c index af0eadf72..969c5dbb0 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 )