php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64725 Wrong return value logic in imageaffinematrixget
Submitted: 2013-04-26 16:08 UTC Modified: 2013-04-26 17:19 UTC
From: sixd@php.net Assigned:
Status: Closed Package: GD related
PHP Version: 5.5Git-2013-04-26 (Git) OS: Linux
Private report: No CVE-ID: None
 [2013-04-26 16:08 UTC] sixd@php.net
Description:
------------
Compile warnings in gd.c show that that the return value logic for imageaffinematrixget is wrong:

/home/cjones/php-5.5/ext/gd/libgd/gd.c: In function ‘gdImagePaletteToTrueColor’:
/home/cjones/php-5.5/ext/gd/libgd/gd.c:3014: warning: unused variable ‘alloc_y’
/home/cjones/php-5.5/ext/gd/gd.c: In function ‘zif_imageaffinematrixget’:
/home/cjones/php-5.5/ext/gd/gd.c:5579: warning: suggest parentheses around assignment used as truth value

The code it points to is:

	if (res = GD_FALSE) {
		RETURN_FALSE;
	} else {



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-26 17:19 UTC] sixd@php.net
The build also has these warnings:

/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c: In function ‘_gdScaleRow’:
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:981: warning: type defaults to ‘int’ in declaration of ‘left_channel’
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c: In function ‘_gdScaleCol’:
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:1023: warning: unused variable ‘row’
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c: In function ‘gdImageRotateGeneric’:
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:1766: warning: unused variable ‘f_127’
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c: At top level:
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:359: warning: ‘filter_cubic_spline’ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:375: warning: ‘filter_cubic_convolution’ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:410: warning: ‘filter_filter’ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:420: warning: ‘filter_lanczos8’ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:436: warning: ‘filter_lanczos3’ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:508: warning: ‘filter_cosine’ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:546: warning: ‘filter_quadratic_bspline’ defined but not used
/home/cjones/php-5.5/ext/gd/libgd/gd_interpolation.c:595: warning: ‘filter_welsh’ defined but not used
 [2013-04-27 16:00 UTC] pajoye@php.net
Automatic comment on behalf of pierre.php@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=25c9f34c9c48cfca70d3e9a154255ef75efd3454
Log: fix #64725, wrong res check
 [2013-04-27 16:00 UTC] pajoye@php.net
-Status: Open +Status: Closed
 [2013-11-17 09:31 UTC] laruence@php.net
Automatic comment on behalf of pierre.php@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=25c9f34c9c48cfca70d3e9a154255ef75efd3454
Log: fix #64725, wrong res check
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC