OSDN Git Service

media: siano: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 07:46:38 +0000 (08:46 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 20 Mar 2020 15:28:07 +0000 (16:28 +0100)
commitaf72bc8cd6ab32be2105129f05eb4502f45577df
treeff0556f4992b1c2f24e080d79afd32174bde2d2d
parent4345e2e5c75895232a17e6783e6233beadc650c4
media: siano: Use scnprintf() for avoiding potential buffer overflow

Since snprintf() returns the would-be-output size instead of the
actual output size, the succeeding calls may go beyond the given
buffer limit.  Fix it by replacing with scnprintf().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/common/siano/smsdvb-debugfs.c