[lkml]   [2019]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 4.19 249/276] media: si2165: fix a missing check of return value

> [ Upstream commit 0ab34a08812a3334350dbaf69a018ee0ab3d2ddd ]
> si2165_readreg8() may fail. Looking into si2165_readreg8(), we will find
> that "val_tmp" will be an uninitialized value when regmap_read() fails.
> "val_tmp" is then assigned to "val". So if si2165_readreg8() fails,
> "val" will be a random value. Further use will lead to undefined
> behaviors. The fix checks if si2165_readreg8() fails, and if so, returns
> its error code upstream.

Ok, but there's still undefined behaviour in si2165_readreg8, 16 and
24, where it manipulates and prints uninitialized memory, right?


(cesky, pictures)
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2019-06-06 14:51    [W:0.816 / U:24.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site