lkml.org 
[lkml]   [2014]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] phy: fix compiler array bounds warning on settings[]
    From
    From: Bjorn Helgaas <bhelgaas@google.com>
    Date: Tue, 04 Mar 2014 17:35:44 -0700

    > With -Werror=array-bounds, gcc v4.7.x warns that in phy_find_valid(), the
    > settings[] "array subscript is above array bounds", I think because idx is
    > a signed integer and if the caller supplied idx < 0, we pass the guard but
    > still reference out of bounds.
    >
    > Fix this by making idx unsigned here and elsewhere.
    >
    > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>

    Applied, thanks.


    \
     
     \ /
      Last update: 2014-03-06 23:01    [W:3.018 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site