php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19317 cosmetic problem on line 308 in var_unserializer.c
Submitted: 2002-09-09 10:14 UTC Modified: 2002-11-03 01:00 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: phpbugs20020909 at pech dot cz Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 4.2.3, 4.3.0-dev OS: RedHat Linux 7.3
Private report: No CVE-ID: None
 [2002-09-09 10:14 UTC] phpbugs20020909 at pech dot cz
There is a comparison (yych <= '\277') on line 308 in file /ext/standard/var_unserializer.c, which is never true (appeared first in "1.6.2.1 by stas").

I suppose that "goto yy15;" is correct, but the comparison is not OK.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-12 09:59 UTC] esben at haabendal dot dk
Furthermore, this breaks build with gcc-3.2, so I don't think it is so smart to keep ignoring this.
 [2002-10-15 15:21 UTC] iliaa@php.net
I've just compiled latest CVS using gcc 3.2. It compiled just fine, gave me the same warnings as gcc 2.95.3 gave. If it fails to compile the problem is likely to be else where.

The configure line used was:
./configure --disable-all --enable-debug

The warnings are certainly something to be fixed, but this is hardly a 'critical' bug.
 [2002-10-15 23:42 UTC] sniper@php.net
Please add the error here which you got with latest CVS snapshot and GCC 3.2 when the compile failed.


 [2002-11-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2003-12-01 20:11 UTC] jessicah at juniper dot net
I got a warning about the comparison with GCC 3.3.2 compiler:
php/ext/standard/var_unserializer.c:308:warning: comparison is always false due to limited range of data type
'\277' is treated as a signed char by default, thus the value is negative. 
The warning will go away if we change the comparison to (yych <= (unsigned char)'\277').
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC