Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#2478 assigned defect

c/src/lib/libbsp/arm/csb336/network/lan91c11x.c: array out of range

Reported by: David Binderman Owned by: Needs Funding
Priority: normal Milestone: Indefinite
Component: unspecified Version: 4.10
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

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

Change History (2)

comment:1 Changed on 01/20/17 at 14:55:00 by David Binderman

Still broken, over a year later.

comment:2 Changed on 01/23/17 at 07:16:12 by Sebastian Huber

Milestone: 4.11.1Indefinite
Owner: set to Needs Funding
Status: newassigned
Note: See TracTickets for help on using tickets.