summaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc/hvc_console.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-03-11 10:29:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-18 12:59:29 +0100
commitcaa47cc639470485ee0ae3c76d56ccf4cfda2045 (patch)
tree7b4cd2091a6c57ab77cb062b5d4abb5c3a70dabb /drivers/tty/hvc/hvc_console.h
parenttty: serial: pch_uart: Use scnprintf() for avoiding potential buffer overflow (diff)
downloadlinux-caa47cc639470485ee0ae3c76d56ccf4cfda2045.tar.xz
linux-caa47cc639470485ee0ae3c76d56ccf4cfda2045.zip
tty: nozomi: 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(). Also rewrite the code in a standard if-form instead of ugly conditional operators. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200311092905.24362-1-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/hvc/hvc_console.h')
0 files changed, 0 insertions, 0 deletions