[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2684aa2-71d7-b82e-df18-65ea3f026d97@canonical.com>
Date: Tue, 31 Jul 2018 14:55:25 +0100
From: Colin Ian King <colin.king@...onical.com>
To: jacopo mondi <jacopo@...ndi.org>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
linux-media@...r.kernel.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][media-next] media: i2c: mt9v111: fix off-by-one array
bounds check
On 31/07/18 14:53, jacopo mondi wrote:
> Hi Colin,
> thanks for the patch.
>
> On Tue, Jul 31, 2018 at 02:33:43PM +0100, Colin King wrote:
>> From: Colin Ian King <colin.king@...onical.com>
>>
>> The check of fse->index is off-by-one and should be using >= rather
>> than > to check the maximum allowed array index. Fix this.
>>
>> Detected by CoverityScan, CID#172122 ("Out-of-bounds read")
>>
>> Fixes: aab7ed1c3927 ("media: i2c: Add driver for Aptina MT9V111")
>> Signed-off-by: Colin Ian King <colin.king@...onical.com>
>
> Acked-by: Jacopo Mondi <jacopo+renesas@...ndi.org>
>
> Thanks
> j
>
Just to note, I also got a build warning on this driver, so that's
something that should be fixed up too.
drivers/media/i2c/mt9v111.c:887:15: warning: 'idx' may be used
uninitialized in this function [-Wmaybe-uninitialized]
unsigned int idx;
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists