Re: [PATCH] iio: ad5755: fix off-by-one on devnr limit check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21/08/16 21:07, Lars-Peter Clausen wrote:
> On 08/21/2016 09:30 PM, Jonathan Cameron wrote:
>> On 25/07/16 23:40, Colin King wrote:
>>> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>>>
>>> The comparison for devnr limits is off-by-one, the current check
>>> allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact
>>> 0 to AD5755_NUM_CHANNELS - 1.  This can lead to an out of bounds
>>> write to pdata->dac[devnr]. Fix this by replacing > with >= on the
>>> comparison.
>>>
>>> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>> Lars? 
>>
>> Looks correct to me.
>>
>> I'd also like a fixes tag for this if possible.  Guessing it
>> might well be the original driver introduction but best to be
>> sure ;)
> 
> It's new in 4.8-rc1. It was introduced by the devictree support patch.
> 
> Fixes: c947459979c6 ("iio: ad5755: add support for dt bindings")
Thanks Lars,

Applied to the togreg branch of iio.git - initially pushed out as
testing for the autobuilders to play with it.

Thanks,

Jonathan
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux