Skip to content

Commit eda9879

Browse files
Salva Peirómchehab
Salva Peiró
authored andcommitted
[media] media/vivid-osd: fix info leak in ioctl
The vivid_fb_ioctl() code fails to initialize the 16 _reserved bytes of struct fb_vblank after the ->hcount member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Salva Peiró <speirofr@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
1 parent 3c5be98 commit eda9879

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: drivers/media/platform/vivid/vivid-osd.c

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ static int vivid_fb_ioctl(struct fb_info *info, unsigned cmd, unsigned long arg)
8585
case FBIOGET_VBLANK: {
8686
struct fb_vblank vblank;
8787

88+
memset(&vblank, 0, sizeof(vblank));
8889
vblank.flags = FB_VBLANK_HAVE_COUNT | FB_VBLANK_HAVE_VCOUNT |
8990
FB_VBLANK_HAVE_VSYNC;
9091
vblank.count = 0;

0 commit comments

Comments
 (0)