[Bug 238658] New: openhpi-2.6.3-4: array subscript is above array bounds
https://bugzilla.novell.com/show_bug.cgi?id=238658 Summary: openhpi-2.6.3-4: 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: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de I just tried to compile package openhpi-2.6.3-4 with the new GNU compiler version 4.3 snapshot 20070119 The compiler said ipmi_inventory.c:518: warning: array subscript is above array bounds The source code is id = get_ipmi_areatype(SAHPI_IDR_AREATYPE_OEM); layout->areas[id].off = offset; id has the value IPMI_FRU_FTR_MULTI_RECORD_AREA, but but the array is declared with IPMI_FRU_FTR_MULTI_RECORD_AREA elements. This is an off by one error. 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=238658 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |mrueckert@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=238658 ------- 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=238658 vadim.a.revyakin@intel.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vadim.a.revyakin@intel.com Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from vadim.a.revyakin@intel.com 2007-02-01 05:40 MST ------- This patch shoul fix the problem: --- plugins/ipmi/ipmi_inventory.c (revision 6396) +++ plugins/ipmi/ipmi_inventory.c (revision 6397) @@ -321,7 +321,7 @@ struct ohoi_fru_layout { unsigned int len; unsigned int free_len; - struct ohoi_area_layout areas[IPMI_FRU_FTR_NUMBER - 1]; + struct ohoi_area_layout areas[IPMI_FRU_FTR_NUMBER]; }; -- 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