]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s5h1420: fix a buffer overflow when checking userspace params
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 28 Apr 2015 21:34:40 +0000 (18:34 -0300)
committerWilly Tarreau <w@1wt.eu>
Fri, 18 Sep 2015 11:52:07 +0000 (13:52 +0200)
commit55e780c13d7c2a1ba5c31af81334b0fb40a77fca
tree82152f30c07230c69fc888dde019e2555aca7278
parent9747205d2dbe6bbf72325dc11fdebf83a5ac7a50
s5h1420: fix a buffer overflow when checking userspace params

commit 12f4543f5d6811f864e6c4952eb27253c7466c02 upstream.

The maximum size for a DiSEqC command is 6, according to the
userspace API. However, the code allows to write up to 7 values:
drivers/media/dvb-frontends/s5h1420.c:193 s5h1420_send_master_cmd() error: buffer overflow 'cmd->msg' 6 <= 7

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit 4bf124b5f179a9c169c57ef7cd3a74f239063ed1)

Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/media/dvb/frontends/s5h1420.c