diff options
Diffstat (limited to 'ext/gd/gd.c')
-rw-r--r-- | ext/gd/gd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index d863523852..b09990938d 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4667,6 +4667,10 @@ PHP_FUNCTION(imagescale) } } + if (tmp_h <= 0 || tmp_w <= 0) { + RETURN_FALSE; + } + new_width = tmp_w; new_height = tmp_h; |