[Bug 232117] New: lvm2-2.02.17-2: array subscript out of range
https://bugzilla.novell.com/show_bug.cgi?id=232117 Summary: lvm2-2.02.17-2: array subscript out of range Product: openSUSE 10.3 Version: unspecified Platform: All OS/Version: SuSE Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de I just tried to compile package lvm2-2.02.17-2 with the Intel C compiler. The compiler said device/device.c(75): warning #175: subscript out of range The source code is part = (struct partition *) (buf + PART_OFFSET); but uint16_t buf[SECTOR_SIZE/sizeof(uint16_t)]; and #define PART_OFFSET UINT64_C(0x1BE) I think the buf array has 256 elements, and 0x1BE is about 446 in decimal. Maybe the programmer intended part = (struct partition *) ( ((char *) buf) + PART_OFFSET); -- 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=232117 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |fehr@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=232117 fehr@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from fehr@novell.com 2007-01-08 08:26 MST ------- You are right. The array buf was of type uint8_t until version 2.02.15. Then it was changed to uint16_t in 2.02.16. This makes the pointer arithmetic invalid. I fixed this in our release where we use version 2.02.16 or newer. Thanks for reporting this. It would make sense if you report this bug also to LVM upstream maintainers at RedHat. -- 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