[Bug 244544] New: lha-1.14i-608 : array subscript is below array bounds
https://bugzilla.novell.com/show_bug.cgi?id=244544 Summary: lha-1.14i-608 : array subscript is below array bounds Product: openSUSE 10.3 Version: unspecified Platform: All OS/Version: SuSE Other Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de I just tried to compile package lha-1.14i-608 with the GNU C compiler version 4.3 snapshot 20070209. The compiler said huf.c:89: warning: array subscript is below array bounds The source code is if (i == i_special) { while (i < 6 && pt_len[i] == 0) so if i is the same value as parameter i_special, we index into array pt_len but write_pt_len(np, pbit, -1); It seems that calling write_pt_len with a third parameter less than zero is wrong. Suggest code rework. -- 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=244544 mhorvath@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=244544 pgajdos@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from pgajdos@novell.com 2007-03-07 03:38 MST ------- Parameter i_special is, in the first place, used for decision, whether code while (i < 6 && pt_len[i] == 0) i++; putbits(2, i - 3); will be executed or not. Because i is always non-negative, calling write_pt_len() with with substituted i_special by -1 means "for any i, don't run this code". -- 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