diff options
author | 2023-09-04 21:54:36 +0200 | |
---|---|---|
committer | 2023-09-11 15:13:35 +0900 | |
commit | e97eb65dd464e7f118a16a26337322d07eb653e2 (patch) | |
tree | 59f4d07c48e20c1ffadff7865588a6a868bb06fd /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ata: libata: disallow dev-initiated LPM transitions to unsupported states (diff) | |
download | wireguard-linux-e97eb65dd464e7f118a16a26337322d07eb653e2.tar.xz wireguard-linux-e97eb65dd464e7f118a16a26337322d07eb653e2.zip |
ata: sata_mv: Fix incorrect string length computation in mv_dump_mem()
snprintf() returns the "number of characters which *would* be generated for
the given input", not the size *really* generated.
In order to avoid too large values for 'o' (and potential negative values
for "sizeof(linebuf) o") use scnprintf() instead of snprintf().
Note that given the "w < 4" in the for loop, the buffer can NOT
overflow, but using the *right* function is always better.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions