From 1ddd1b768dc3821e275e97c9391e54a14a8dc136 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 16 Jan 2008 06:58:54 +0000 Subject: [PATCH] * src/raster/ftraster.c (ft_black_render): Check `outline' before using it. Reported by Allan Yang. --- ChangeLog | 5 +++++ src/raster/ftraster.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1b7fcff3c..69263fe4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-16 Werner Lemberg + + * src/raster/ftraster.c (ft_black_render): Check `outline' before + using it. Reported by Allan Yang. + 2008-01-12 Werner Lemberg * src/raster/ftraster.c (FT_CONFIG_OPTION_5_GRAY_LEVELS): Remove. diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 814912d8d..9a96fb8e6 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -3321,11 +3321,14 @@ static const char count_table[256] = if ( !raster || !raster->buffer || !raster->buffer_size ) return Raster_Err_Not_Ini; + if ( !outline ) + return Raster_Err_Invalid; + /* return immediately if the outline is empty */ if ( outline->n_points == 0 || outline->n_contours <= 0 ) return Raster_Err_None; - if ( !outline || !outline->contours || !outline->points ) + if ( !outline->contours || !outline->points ) return Raster_Err_Invalid; if ( outline->n_points != outline->contours[outline->n_contours - 1] + 1 )