com php-src: - #64710, check return val: ext/gd/gd.c
| From: | Pierre Joye | Date: | Fri, 26 Apr 2013 06:15:33 +0000 |
| Subject: | com php-src: - #64710, check return val: ext/gd/gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72031@lists.php.net to get a copy of this message | ||
Commit: 2809afa1196bd73c3a5e5c119bd1d7db3cf45844
Author: Pierre Joye <pierre.php@gmail.com> Fri, 26 Apr 2013 08:15:33 +0200
Parents: 7bd20354a828b1975571bddf7e1f7a43e264992d
Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2809afa1196bd73c3a5e5c119bd1d7db3cf45844
Log:
- #64710, check return val
Bugs:
https://bugs.php.net/64710
Changed paths:
M ext/gd/gd.c
Diff:
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index c3f6188...60056d1 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -5516,7 +5516,7 @@ PHP_FUNCTION(imageaffinematrixget)
gdAffineStandardMatrix type;
zval *options;
zval **tmp;
- int res, i;
+ int res = GD_FALSE, i;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|z", &type, &options) ==
FAILURE) {
return;
@@ -5576,9 +5576,13 @@ PHP_FUNCTION(imageaffinematrixget)
RETURN_FALSE;
}
- array_init(return_value);
- for (i = 0; i < 6; i++) {
- add_index_double(return_value, i, affine[i]);
+ if (res = GD_FALSE) {
+ RETURN_FALSE;
+ } else {
+ array_init(return_value);
+ for (i = 0; i < 6; i++) {
+ add_index_double(return_value, i, affine[i]);
+ }
}
}