From 9f5d3de3f00d457e375e39790334f9414805ebf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wu=2C=20Chia-I=20=28=E5=90=B3=E4=BD=B3=E4=B8=80=29?= Date: Tue, 28 Feb 2006 13:21:50 +0000 Subject: [PATCH] * src/base/ftutil.c (ft_mem_qalloc) [FT_STRICT_ALIASING]: Do not return error if size == 0. --- ChangeLog | 5 +++++ src/base/ftutil.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b5b84b4e9..59f0d91d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-28 Chia-I Wu + + * src/base/ftutil.c (ft_mem_qalloc) [FT_STRICT_ALIASING]: Do not + return error when size == 0. + 2006-02-28 Chia-I Wu * src/base/ftobjs.c (FT_Done_Library): Modules are removed in the diff --git a/src/base/ftutil.c b/src/base/ftutil.c index c02f25b9d..824f92f8c 100644 --- a/src/base/ftutil.c +++ b/src/base/ftutil.c @@ -92,7 +92,7 @@ if ( block == NULL ) error = FT_Err_Out_Of_Memory; } - else + else if ( size < 0 ) { /* may help catch/prevent security issues */ error = FT_Err_Invalid_Argument;