summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2024-11-14 16:46:02 +0100
committerHeiko Carstens <hca@linux.ibm.com>2024-11-21 12:44:06 +0100
commit897614f90f7cd9fd7f5b7acca24dfb55b6c0c4ae (patch)
tree7baf745fa0dd91f20c111d7e197fd0c702371790 /tools/perf/scripts/python/task-analyzer.py
parent3f020399e4f1c690ce87b4c472f75b1fc89e07d5 (diff)
s390/debug: Pass in and enforce output buffer size for format handlers
The s390dbf format handler rely on being passed an output buffer sized such that their output will always fit and then use plain sprintf() to write to it. While only supplied data from other kernel components this still potentially allows buffer overwrite if callers are not careful. Instead just pass in the size of the output buffer and use scnprintf() instead of sprintf() and strscpy() instead of strcpy(). The latter also allows us to get rid of a separate strlen() call. Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions