aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/failed-syscalls-by-pid.py
diff options
context:
space:
mode:
authorAmir Mohammad Jahangirzad <[email protected]>2025-06-08 16:35:59 +0000
committerMike Marshall <[email protected]>2025-07-21 15:12:33 +0000
commitcdfa1304657d6f23be8fd2bb0516380a3c89034e (patch)
tree0035c9265051ac1f1594f9d543954baf92bb0ee3 /tools/perf/scripts/python/failed-syscalls-by-pid.py
parentLinux 6.16-rc6 (diff)
downloadkernel-cdfa1304657d6f23be8fd2bb0516380a3c89034e.tar.gz
kernel-cdfa1304657d6f23be8fd2bb0516380a3c89034e.zip
fs/orangefs: use snprintf() instead of sprintf()
sprintf() is discouraged for use with bounded destination buffers as it does not prevent buffer overflows when the formatted output exceeds the destination buffer size. snprintf() is a safer alternative as it limits the number of bytes written and ensures NUL-termination. Replace sprintf() with snprintf() for copying the debug string into a temporary buffer, using ORANGEFS_MAX_DEBUG_STRING_LEN as the maximum size to ensure safe formatting and prevent memory corruption in edge cases. EDIT: After this patch sat on linux-next for a few days, Dan Carpenter saw it and suggested that I use scnprintf instead of snprintf. I made the change and retested. Signed-off-by: Amir Mohammad Jahangirzad <[email protected]> Signed-off-by: Mike Marshall <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions