Re: [PHP-DEV] phpng parameter parsing bug

[email protected] (Dmitry Stogov)
Newsgroups php.internals
Message-ID <CA+9eiLvhwa-PtPqVcL-HByinEhjQpADqwbB5JgSVNpgjyy38CA@mail.gmail.com>
Thanks for catching this. I'm fixing it.

Dmitry.


On Mon, Aug 18, 2014 at 5:57 AM, Andrea Faulds <[email protected]> wrote:

> 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/
>
>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.