com php-src: Fixed bug #75139 (libgd/gd_interpolation.c :1786: suspicious if ?): NEWS ext/g d/libgd/gd_interpolation.c

From: Date: Fri, 01 Sep 2017 22:04:02 +0000
Subject: com php-src: Fixed bug #75139 (libgd/gd_interpolation.c :1786: suspicious if ?): NEWS ext/g d/libgd/gd_interpolation.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99230@lists.php.net to get a copy of this message
Commit: e20a6b0213e108da50293d1fff885f507e6115ac Author: Christoph M. Becker <cmbecker69@gmx.de> Sat, 2 Sep 2017 00:04:02 +0200 Parents: a86df6bcb0bca601fa0178d6231daf9eb6b62505 Branches: PHP-7.0 PHP-7.1 PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e20a6b0213e108da50293d1fff885f507e6115ac Log: Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?) We back-port https://github.com/libgd/libgd/commit/dd48286 even though we cannot come up with a regression test, because the erroneous condition appears to be impossible to trigger. We also parenthesize the inner ternary operation to avoid confusion. Bugs: https://bugs.php.net/75139 Changed paths: M NEWS M ext/gd/libgd/gd_interpolation.c Diff: diff --git a/NEWS b/NEWS index bd93282..09b0307 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ PHP NEWS - GD: . Fixed bug #75124 (gdImageGrayScale() may produce colors). (cmb) + . Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?). (cmb) - Intl: . Fixed bug #75090 (IntlGregorianCalendar doesn't have constants from parent diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 1c151b5..4446ec7 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -1783,8 +1783,8 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b const gdFixed f_slop_y = f_sin; const gdFixed f_slop_x = f_cos; - const gdFixed f_slop = f_slop_x > 0 && f_slop_x > 0 ? - f_slop_x > f_slop_y ? gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y) + const gdFixed f_slop = f_slop_x > 0 && f_slop_y > 0 ? + (f_slop_x > f_slop_y ? gd_divfx(f_slop_y, f_slop_x) : gd_divfx(f_slop_x, f_slop_y)) : 0;

« previous php.cvs (#99230) next »