diff options
author | Pierre Joye <pierre.php@gmail.com> | 2016-06-07 17:16:40 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2016-06-07 17:16:40 +0700 |
commit | f80125950ca5de51b6f5851f82c80a99d571de6c (patch) | |
tree | 82ba2fa479bead210ddabd26a965425cccbaaaf7 /ext/gd/gd.c | |
parent | 2a0ed8a2eb091e309bf2cd1560a39ea66b094e07 (diff) | |
download | php-git-f80125950ca5de51b6f5851f82c80a99d571de6c.tar.gz |
#72337 invalid dimensions can lead to segv
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 0fce8ddcdf..cb070abf84 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -5145,6 +5145,10 @@ PHP_FUNCTION(imagescale) } } + if (tmp_h <= 0 || tmp_w <= 0) { + RETURN_FALSE; + } + new_width = tmp_w; new_height = tmp_h; |