Opened on 01/05/09 at 15:07:54
Closed on 01/06/09 at 15:29:45
#1350 closed defect (fixed)
arm/csb336/network/lan91c11x.c: array subscript is above array bounds
Reported by: | Ralf Corsepius | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | 4.10 |
Component: | bsps | Version: | 4.8 |
Severity: | critical | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Using very aggressive warning flags on rtems-4.10/rtems-CVS, exposes this bug:
arm-rtems4.10-gcc --pipe -B../../../../../.././lib/
-B../../../../../.././csb336/lib/ -specs bsp_specs -qrtems -DHAVE_CONFIG_H
-isystem ../../../../../.././csb336/lib/include -DINSIDE_RTEMS_BSD_TCPIP_STACK
-Wall -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -ansi -fasm -mcpu=arm920 -mstructure-size-boundary=8
-O2 -g -MT network_rel-lan91c11x.o -MD -MP -MF .deps/network_rel-lan91c11x.Tpo -c
-o network_rel-lan91c11x.o test -f 'network/lan91c11x.c' || echo '../../../../../../../../../rtems.work/c/src/lib/libbsp/arm/csb336/'
network/lan91c11x.c
../../../../../../../../../rtems.work/c/src/lib/libbsp/arm/csb336/network/lan91c11x.c: In function 'lan91c11x_write_phy_reg':
../../../../../../../../../rtems.work/c/src/lib/libbsp/arm/csb336/network/lan91c11x.c:228: warning: array subscript is above array bounds
mv -f .deps/network_rel-lan91c11x.Tpo .deps/network_rel-lan91c11x.Po
GCC's warning is right.
The location it warns about, expands to
bits[64] = ...
which is "one index beyon array bounds" (bit[64]).
Unfortunately, I don't understand enough about this piece of code to be able to fix it.
Affected: rtems-4.8, 4.9 and 4.10
Attachments (2)
Change History (5)
comment:1 Changed on 01/05/09 at 15:08:10 by Ralf Corsepius
Summary: | arm/csb336/network/lan91c11x.crray subscript is above array bounds → arm/csb336/network/lan91c11x.c: array subscript is above array bounds |
---|
Changed on 01/05/09 at 15:25:44 by Joel Sherrill
comment:2 Changed on 01/06/09 at 15:27:17 by Joel Sherrill
attachments.isobsolete: | 0 → 1 |
---|
comment:3 Changed on 01/06/09 at 15:29:45 by Joel Sherrill
Resolution: | → fixed |
---|---|
Status: | new → closed |
Patch applied to 4.8 branch, 4.9 branch and CVS head.
Proposed patch