Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Dmitry Stogov
Hi Pierre, The check for (byte_count_signed 2147483648) looks ugly and it's even wrong. It should be changed to something like (byte_count_signed INT32_MAX) where INT32_MAX = 0x7fff (or 2147483647). Thanks. Dmitry. On 02/14/2011 12:08 PM, Pierre Joye wrote: (byte_count_signed

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Pierre Joye
On Tue, Feb 15, 2011 at 10:17 AM, Dmitry Stogov dmi...@zend.com wrote: Hi Pierre, The check for (byte_count_signed 2147483648) looks ugly and it's even wrong. It is not ugly nor wrong. See my post in when I proposed the patch. It should actually be something much lower but I did not find a

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Dmitry Stogov
On 02/15/2011 12:31 PM, Pierre Joye wrote: On Tue, Feb 15, 2011 at 10:17 AM, Dmitry Stogovdmi...@zend.com wrote: Hi Pierre, The check for (byte_count_signed 2147483648) looks ugly and it's even wrong. It is not ugly nor wrong. See my post in when I proposed the patch. It should actually be

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Pierre Joye
On Tue, Feb 15, 2011 at 12:54 PM, Dmitry Stogov dmi...@zend.com wrote: I don't know all the logic but it looks very strange 2147483648 == 0x8000 != 0x7fff == 2147483647 so byte_count_signed may be 0x8000 == -1 negative value are checked before. Btw, byte_count_signed is a 64bit

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Dmitry Stogov
On 02/15/2011 03:31 PM, Pierre Joye wrote: On Tue, Feb 15, 2011 at 12:54 PM, Dmitry Stogovdmi...@zend.com wrote: I don't know all the logic but it looks very strange 2147483648 == 0x8000 != 0x7fff == 2147483647 so byte_count_signed may be 0x8000 == -1 negative value are

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Pierre Joye
why don't you fix it the way you want instead of arguing endlessly? I gave all info to explain the reasoning behind that code, if it is wrong, and that's totally possible, then fix it and let move on :) Cheers, On Tue, Feb 15, 2011 at 2:21 PM, Dmitry Stogov dmi...@zend.com wrote: On 02/15/2011

Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/exif/exif.c branches/PHP_5_3/ext/exif/tests/bug54002.phpt branches/PHP_5_3/ext/exif/tests/bug54002_1.jpeg branches/PHP_5_3/ext/exif/tests/bug54002

2011-02-15 Thread Pierre Joye
and btw, as I said earlier, I would prefer to use the largest possible value, which is likely to be 64K and not maxint. If only one could point us to the specs for this exact value... On Tue, Feb 15, 2011 at 2:27 PM, Pierre Joye pierre@gmail.com wrote: why don't you fix it the way you want