lkml.org 
[lkml]   [2018]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][next] media: ispstat: don't dereference user_cfg before a null check
On Tue, Apr 24, 2018 at 02:06:18PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer user_cfg (a copy of new_conf) is dereference before
> new_conf is null checked, hence we may have a null pointer dereference
> on user_cfg when assigning buf_size from user_cfg->buf_size. Ensure
> this does not occur by moving the assignment of buf_size after the
> null check.
>
> Detected by CoverityScan, CID#1468386 ("Dereference before null check")
>
> Fixes: 68e342b3068c ("[media] omap3isp: Statistics")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks for the patch.

Gustavo sent effectively the same patch a moment earlier, and that patch
got applied instead.

--
Sakari Ailus
e-mail: sakari.ailus@iki.fi

\
 
 \ /
  Last update: 2018-04-26 10:38    [W:0.052 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site