[RTEMS Project] #2478: c/src/lib/libbsp/arm/csb336/network/lan91c11x.c: array out of range

RTEMS trac trac at rtems.org
Thu Nov 26 10:42:27 UTC 2015


#2478: c/src/lib/libbsp/arm/csb336/network/lan91c11x.c: array out of range
---------------------+--------------------
 Reporter:  dcb      |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:  4.11.1
Component:  General  |    Version:  4.10
 Severity:  normal   |   Keywords:
---------------------+--------------------
 c/src/lib/libbsp/arm/csb336/network/lan91c11x.c:148]: (error) Array
 'bits[64]' accessed at index 127, which is out of bounds.

 Source code is

     for (i = 0; i < sizeof bits; ++i) {
         /* Clock Low - output data */
         lan91c11x_write_reg(LAN91C11X_MGMT, bits[i]);

 but

     uint16_t bits[64];

 so sizeof bits is 128, not 64.

 This problem seems to have appeared since sometime after 20151112

--
Ticket URL: <http://devel.rtems.org/ticket/2478>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list