Bug 240891 - xlockmore-5.23-21: array subscript is above array bounds
Summary: xlockmore-5.23-21: array subscript is above array bounds
Status: RESOLVED DUPLICATE of bug 240922
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: X11 Applications (show other bugs)
Version: unspecified
Hardware: All SUSE Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: Stefan Dirsch
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-31 21:20 UTC by David Binderman
Modified: 2007-01-31 22:12 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2007-01-31 21:20:08 UTC
I just tried to compile package xlockmore-5.23-21
with the new GNU compiler version 4.3 snapshot 20070126

The compiler said

solitare.cc:1229: warning: array subscript is above array bounds

The source code is

        for (pile = 0; pile < MAXPILES; pile++)
                if (alternatePiles[pile]->canTake(card))

but

        CardPile * alternatePiles[MAXALTERNATEPILES];

#define MAXSUITS 4
#define MAXALTERNATEPILES 7
#define MAXPILES (MAXALTERNATEPILES+MAXSUITS+2)

Suggest code rework.
Comment 1 Stefan Dirsch 2007-01-31 22:12:33 UTC

*** This bug has been marked as a duplicate of bug 240922 ***