summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gd/gd.c2
1 files changed, 1 insertions, 1 deletions
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))