Bug 253482

Summary: SDL_perl-1.20.0-410 : array subscript is above array bounds
Product: [openSUSE] openSUSE 10.3 Reporter: David Binderman <dcb314>
Component: OtherAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Alpha 1plus   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description David Binderman 2007-03-12 08:33:08 UTC
I just tried to build package SDL_perl-1.20.0-410
with the GNU C compiler 4.3 snapshot 20070309.

The compiler said

OpenGL.xs:738: warning: array subscript is above array bounds

The source code is

                        float v[3];
                        for ( i = 0; i < 4; i++ ) {
                                v[i] = (SvNOK(ST(i+2))) ? SvNV(ST(i+2)) : 0.0;
                        }

This is clearly broken code, since v[ 3] does not exist.  Suggest code rework.
Comment 1 Stefan Dirsch 2007-03-12 12:57:15 UTC
fixed in STABLE/Factory.