mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 02:04:19 +08:00
media: rcar_drif: fix a memory disclosure
"f->fmt.sdr.reserved" is uninitialized. As other peer drivers like msi2500 and airspy do, the fix initializes it to avoid memory disclosures. Signed-off-by: Kangjie Lu <kjlu@umn.edu> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
60afcc06ad
commit
d39083234c
@ -912,6 +912,7 @@ static int rcar_drif_g_fmt_sdr_cap(struct file *file, void *priv,
|
||||
{
|
||||
struct rcar_drif_sdr *sdr = video_drvdata(file);
|
||||
|
||||
memset(f->fmt.sdr.reserved, 0, sizeof(f->fmt.sdr.reserved));
|
||||
f->fmt.sdr.pixelformat = sdr->fmt->pixelformat;
|
||||
f->fmt.sdr.buffersize = sdr->fmt->buffersize;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user