From: Bjorn Helgaas
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 r
From: Bjorn Helgaas
> I'm stumped. phy_find_valid() is static and only called from one
> place. The 'idx' argument is always the result of phy_find_setting(),
> which should always return something between 0 and
> ARRAY_SIZE(settings), so I don't see any way idx can be < 0.
>
> I stripped this d
[+cc Florian]
On Wed, Mar 5, 2014 at 2:10 AM, David Laight wrote:
> From: Bjorn Helgaas
>> 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
From: Bjorn Helgaas
> On Wed, Mar 5, 2014 at 2:10 AM, David Laight wrote:
> > From: Bjorn Helgaas
> >> 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 s
On Wed, Mar 5, 2014 at 2:10 AM, David Laight wrote:
> From: Bjorn Helgaas
>> 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 g
From: Bjorn Helgaas
> 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.
Not rejecting t
2014-03-04 16:35 GMT-08:00 Bjorn Helgaas :
> 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 b
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 el
8 matches
Mail list logo