platform/x86: sony-laptop: Use scnprintf() for avoiding potential buffer overflow
authorTakashi Iwai <tiwai@suse.de>
Wed, 11 Mar 2020 09:07:39 +0000 (10:07 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 20 Mar 2020 12:44:47 +0000 (14:44 +0200)
commitb40e288bfb530e4e12c22c3f8e8ba19e419013da
tree020b19c86866c690fe800fd281bb981951bac362
parent1d6f8c5bac93cceb2d4ac8e6331050652004d802
platform/x86: sony-laptop: 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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/sony-laptop.c