Bug 155326

Summary: 2 * array subscript out of range
Product: [Fedora] Fedora Reporter: David Binderman <dcb314>
Component: iprouteAssignee: Radek Vokál <rvokal>
Status: CLOSED NOTABUG QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-08-10 11:33:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.