com php-src: Fix bug #72407: NULL Pointer Dereference at _gdScaleVert: ext/gd/libgd/gd_interpolation.c

From: Date: Sun, 19 Jun 2016 04:57:25 +0000
Subject: com php-src: Fix bug #72407: NULL Pointer Dereference at _gdScaleVert: ext/gd/libgd/gd_interpolation.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92532@lists.php.net to get a copy of this message
Commit: b9ec171e7d25879d97473ca50197c4207420c276 Author: Stanislav Malyshev <stas@php.net> Sat, 18 Jun 2016 21:57:25 -0700 Parents: 5b597a2e5b28e2d5a52fc1be13f425f08f47cb62 Branches: PHP-5.5 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b9ec171e7d25879d97473ca50197c4207420c276 Log: Fix bug #72407: NULL Pointer Dereference at _gdScaleVert Bugs: https://bugs.php.net/72407 Changed paths: M ext/gd/libgd/gd_interpolation.c Diff: diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 0961c08..4fa23f0 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -1049,6 +1049,9 @@ static inline void _gdScaleVert (const gdImagePtr pSrc, const unsigned int src_w } contrib = _gdContributionsCalc(dst_height, src_height, (double)(dst_height) / (double)(src_height), pSrc->interpolation); + if (contrib == NULL) { + return; + } /* scale each column */ for (u = 0; u < dst_width - 1; u++) { _gdScaleCol(pSrc, src_width, pDst, dst_width, dst_height, u, contrib);

« previous php.cvs (#92532) next »