]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l: xilinx: harmless buffer overflow
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 21 Apr 2015 09:31:10 +0000 (06:31 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 13 May 2015 19:26:48 +0000 (16:26 -0300)
commitbad1d926c88effd0c2c672cb4f7f191268271370
treed430bed917d3d63344f003ddd9839288480836af
parent5db8a4c60c32ea6ff7324057b1e58e08c5df1de5
[media] v4l: xilinx: harmless buffer overflow

My static checker warns that the name of the port can be 15 characters
when you consider the NUL terminator and that's one more than the 14
characters in name[].  Maybe it's an off-by-one?

It's unlikely that we hit the limit and even if we do the overflow will
only affect one of the two bytes of padding so it's harmless.  Still
let's fix it and also change the sprintf() to snprintf().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/xilinx/xilinx-dma.c