Bug 143795

Summary: strange address arithmetic
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.0.3-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-11 21:42:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Binderman 2004-12-28 10:20:15 UTC
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 11:30:31 UTC
Thanks, your fix looks correct, I've committed this upstream too.

Comment 2 Joe Orton 2005-02-11 21:42:18 UTC
Patch integrated in Raw Hide, thanks for the report.