NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/50757: src/usr.sbin/sysinst/arch/mac68k/md.c: 2 * array index out of range ?
>Number: 50757
>Category: bin
>Synopsis: src/usr.sbin/sysinst/arch/mac68k/md.c: 2 * array index out of range ?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 03 10:05:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160203
>Organization:
>Environment:
>Description:
[src/usr.sbin/sysinst/arch/mac68k/md.c:180]: (error) Array 'new_map[6]' accessed at index 14, which is out of bounds.
Source code is
for (i=0;i<NEW_MAP_SIZE;i++) {
if (i > 0)
new_map[i].pmPyPartStart = new_map[i-1].pmPyPartStart +
new_map[i-1].pmPartBlkCnt;
new_map[i].pmDataCnt = new_map[i].pmPartBlkCnt;
but
src/usr.sbin/sysinst/arch/mac68k/md.h:#define NEW_MAP_SIZE 15
and new_map only seems to have six elements in it.
I make the observation that this kind of array index problem
would normally be caught by gcc compiler flag -D_FORTIFY_SOURCE=2.
Maybe this flag doesn't get used in the normal builds ?
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index