Takashi Iwai caa47cc639 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>
2020-03-18 12:59:29 +01:00
..
2019-12-03 14:09:14 -08:00
2019-11-13 19:01:14 +08:00
2019-04-16 15:21:34 +02:00
2017-11-28 15:32:33 +01:00
2018-10-13 00:50:32 -04:00
2020-02-19 12:46:48 +01:00
2017-11-08 13:08:12 +01:00
2019-11-04 17:42:28 +01:00
2019-04-16 15:21:34 +02:00