Bug 143795 - strange address arithmetic
strange address arithmetic
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-28 05:20 EST by David Binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 5.0.3-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-02-11 16:42:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Binderman 2004-12-28 05:20:15 EST
Description of problem:

I just tried to compile package php-5.0.2-8 from 
Redhat Fedora development tree.

The compiler said

/usr/src/redhat/BUILD/php-5.0.2/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c(123):
warning #175: subscript out of range

The source code is

                        int *p = tmp + sizeof(tmp);

but

        int tmp[64];

so sizeof( tmp) is 4 * 64 == 256 bytes, so p seems to be pointing into
the middle of nowhere. Maybe 

                        int *p = &tmp[ 0] + (sizeof(tmp) / sizeof(
tmp[ 0]);

was intended ?


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Joe Orton 2005-01-10 06:30:31 EST
Thanks, your fix looks correct, I've committed this upstream too.
Comment 2 Joe Orton 2005-02-11 16:42:18 EST
Patch integrated in Raw Hide, thanks for the report.

Note You need to log in before you can comment on or make changes to this bug.