From ab0d5fecd33d67c93da764efabbfa126b2ae7381 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 28 Jun 2002 09:23:50 +0000 Subject: [PATCH] Fix bug: #17528, do not crash with empty string. --- ext/gd/gd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.50.1