aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2020-03-16 13:49:41 +0100
committerJonathan Cameron <[email protected]>2020-04-19 16:56:14 +0100
commit3dee0426289818fee3c827fdd166cc5b874c756c (patch)
treef6b9591adf18a220def9e51688a4a3b24c773d3f /tools/perf/scripts/python/exported-sql-viewer.py
parentbf09cddb2cd4028681a83426649f18b90c662e16 (diff)
iio: tsl2772: Use scnprintf() for avoiding potential buffer overflow
snprintf() is a hard-to-use function, it's especially difficult to use it for concatenating substrings in a buffer with a limited size. Since snprintf() returns the would-be-output size, not the actual size, the subsequent use of snprintf() may go beyond the given limit easily. Although the current code doesn't actually overflow the buffer, it's an incorrect usage. This patch replaces such snprintf() calls with a safer version, scnprintf(). Also this fixes the incorrect argument of the buffer limit size passed to snprintf(), too. The size has to be decremented for the remaining length. Signed-off-by: Takashi Iwai <[email protected]> Reviewed-by: Brian Masney <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions