Re: com php-src: Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()): NEWS ext/gd/gd.c ext/gd/tests/bug66356.phpt main/php_version.h
| From: | Yasuo Ohgaki | Date: | Fri, 27 Dec 2013 22:26:29 +0000 |
| Subject: | Re: com php-src: Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()): NEWS ext/gd/gd.c ext/gd/tests/bug66356.phpt main/php_version.h | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-75481@lists.php.net to get a copy of this message | ||
Hi all,
We might be better to have Zend macro (or function) to do
+ if (Z_TYPE_PP(var) != IS_LONG) {
+ zval lval;
+ lval = **var;
+ zval_copy_ctor(&lval);
+ convert_to_long(&lval);
+ points[i].y = Z_LVAL(lval);
+ } else {
+ points[i].y = Z_LVAL_PP(var);
+ }
this kind of operation.
There may be other extensions that incorrectly assume parameter data types.
Just an idea and I don't think macro is strictly needed.
Any comments?
--
Yasuo Ohgaki
yohgaki@ohgaki.net