phpng parameter parsing bug
| From: | Andrea Faulds | Date: | Mon, 18 Aug 2014 01:57:49 +0000 |
| Subject: | phpng parameter parsing bug | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-76624@lists.php.net to get a copy of this message | ||
Hi!
In _z_param_long in Zend/zend_API.h:
if (EXPECTED(Z_TYPE_P(arg) == IS_LONG)) {
if (strict && UNEXPECTED(Z_DVAL_P(arg) > LONG_MAX)) {
*dest = LONG_MAX;
} else if (strict && UNEXPECTED(Z_DVAL_P(arg) < LONG_MIN)) {
*dest = LONG_MIN;
} else {
*dest = Z_LVAL_P(arg);
}
Note that it’s interpreting a long argument as a double. I expect this will probably go horribly,
horribly wrong.
I don’t have /Zend karma (yet!), could this be fixed?
Thanks!
--
Andrea Faulds
http://ajf.me/