From: foobar Date: Fri, 28 Jun 2002 09:23:50 +0000 (+0000) Subject: Fix bug: #17528, do not crash with empty string. X-Git-Tag: php-4.3.0dev_zend2_alpha2~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab0d5fecd33d67c93da764efabbfa126b2ae7381;p=php Fix bug: #17528, do not crash with empty string. --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 4ce04e79aa..67dd792275 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -963,7 +963,7 @@ static int _php_image_type (char data[8]) #ifdef HAVE_LIBGD15 /* Based on ext/standard/images.c */ - if (data == NULL) + if (data == NULL || strlen(data) <= 0) return -1; if (!memcmp(data, php_sig_gd2, 3))