Bug #68712 [Asn]: identical code
| From: | cmb@php.net | Date: | Sun, 12 Jul 2015 12:56:09 +0000 |
| Subject: | Bug #68712 [Asn]: identical code | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-194349@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68712&edit=1
ID: 68712
Updated by: cmb@php.net
Reported by: bugreports at internot dot info
Summary: identical code
Status: Assigned
Type: Bug
Package: GD related
Operating System: Linux Ubuntu 14.04
PHP Version: master-Git-2015-01-02 (Git)
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
For easier reference:
<https://github.com/php/php-src/blob/php-5.6.11/ext/gd/libgd/gd_interpolation.c#L1539-L1545>
<https://github.com/php/php-src/blob/php-5.6.11/ext/gd/libgd/gd_interpolation.c#L1946-L1952>
It seems to me that the construction of the matrixes in
gdImageScaleBicubicFixed() and gdImageRotateBicubicFixed() need
review. Particularly, setting of index 9 seems to be erroneous:
<https://github.com/php/php-src/blob/php-5.6.11/ext/gd/libgd/gd_interpolation.c#L1507-L1513>
<https://github.com/php/php-src/blob/php-5.6.11/ext/gd/libgd/gd_interpolation.c#L2004-L2010>
Previous Comments:
------------------------------------------------------------------------
[2015-01-02 07:28:36] bugreports at internot dot info
Description:
------------
Hi,
in /ext/gd/libgd/gd_interpolation.c:
1539 if (m >= src_h - 2) {
1540 src_offset_x[13] = n;
1541 src_offset_y[13] = m;
1542 } else {
1543 src_offset_x[13] = n;
1544 src_offset_y[13] = m;
1545 }
and
1946 if (m < 1) {
1947 src_offset_x[1] = n;
1948 src_offset_y[1] = m;
1949 } else {
1950 src_offset_x[1] = n;
1951 src_offset_y[1] = m ;
1952 }
In each, each possiblity is the same. Is this intended?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68712&edit=1