[Bug 238278] New: nethack-3.4.3-95 : array subscript is above array bounds
https://bugzilla.novell.com/show_bug.cgi?id=238278 Summary: nethack-3.4.3-95 : array subscript is above array bounds Product: openSUSE 10.3 Version: unspecified Platform: All OS/Version: SuSE Other Status: NEW Severity: Normal Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de I just tried to compile package nethack-3.4.3-95 with the new GNU compiler version 4.3 snapshot 20070119 The compiler said mhitu.c:236: warning: array subscript is above array bounds The source code is for(i = 0; i < NATTK; i++) if(mdat->mattk[i].aatyp == AT_ENGL) break; if (mdat->mattk[i].aatyp != AT_ENGL) but linux:/usr/src/packages/SPECS # find ../BUILD/nethack-3.4.3/ -name \*.h -print | xargs fgrep mattk ./BUILD/nethack-3.4.3/include/permonst.h: struct attack mattk[NATTK]; /* attacks matrix */ I agree with the compiler. mdat->mattk[ NATTK] does not exist. Suggest new code for(i = 0; i < NATTK; i++) if(mdat->mattk[i].aatyp == AT_ENGL) break; if (i >= NATTK) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238278 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |sbrabec@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238278 ------- Comment #1 from sndirsch@novell.com 2007-01-31 15:40 MST ------- Feel free to close as duplicate of Bug #240922. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=238278 mvaner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from mvaner@novell.com 2007-02-19 10:22 MST ------- Fixed -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com