media: dvb_ca_en50221: sanity check slot number from userspace
Currently a user can pass in an unsanitized slot number which will lead to and out of range index into ca->slot_info. Fix this by checking that the slot number is no more than the allowed maximum number of slots. Seems that this bug has been in the driver forever. Detected by CoverityScan, CID#139381 ("Untrusted pointer read") Signed-off-by: NColin Ian King <colin.king@canonical.com> Reviewed-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NJasmin Jessich <jasmin@anw.at> Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
Showing
想要评论请 注册 或 登录