Bug 155326 - 2 * array subscript out of range
Summary: 2 * array subscript out of range
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: iproute
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Radek Vokál
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-19 08:39 UTC by David Binderman
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-08-10 11:33:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Binderman 2005-04-19 08:39:15 UTC
Description of problem:

I just tried to compile iproute-2.6.11-1 from Redhat
Fedora Core development tree with the Intel C compiler.

The compiler said

m_action.c(256): warning #175: subscript out of range
m_action.c(258): warning #175: subscript out of range

The source code is

        if (show_stats && tb[TCA_ACT_STATS]) {
                fprintf(f, "\tAction statistics:\n");
                print_tcstats2_attr(f, tb[TCA_ACT_STATS], "\t", NULL);

But

        struct rtattr *tb[TCA_ACT_MAX + 1];

and TCA_ACT_STATS has the value 8, and TCA_ACT_MAX has the value 4.

Suggest code re-work.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Radek Vokál 2005-08-10 11:33:53 UTC
Got response from upstream and this is sane. Closing as NOTABUG

Comment 2 David Binderman 2005-08-10 20:43:55 UTC
>Got response from upstream and this is sane. 

I'd be grateful if you could show where 
either I or the Intel compiler has gone wrong.


Note You need to log in before you can comment on or make changes to this bug.