diff options
author | foobar <sniper@php.net> | 2002-06-28 09:23:50 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-06-28 09:23:50 +0000 |
commit | ab0d5fecd33d67c93da764efabbfa126b2ae7381 (patch) | |
tree | e81a43a40c5b0d71ca7a8431cfd3b9ab7d4da1a5 | |
parent | f4699170fcffc2760391eaffd06abd2e5df75513 (diff) | |
download | php-git-ab0d5fecd33d67c93da764efabbfa126b2ae7381.tar.gz |
Fix bug: #17528, do not crash with empty string.
-rw-r--r-- | ext/gd/gd.c | 2 |
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)) |