media: atomisp: Fix a buffer overflow in debug code
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Nov 2020 16:27:18 +0000 (17:27 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 11:34:26 +0000 (12:34 +0100)
commit625993166b551d633917ca35d4afb7b46d7451b4
tree28eca83f5392cce86833352307a999a86a155442
parent7072db89572135f28cad65f15877bf7e67cf2ff8
media: atomisp: Fix a buffer overflow in debug code

The "pad" variable is a user controlled string and we haven't properly
clamped it at this point so the debug code could print from beyond the
of the array.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_subdev.c