aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorYun Zhou <[email protected]>2021-06-26 11:21:55 +0800
committerSteven Rostedt (VMware) <[email protected]>2021-06-26 09:18:48 -0400
commitd3b16034a24a112bb83aeb669ac5b9b01f744bb7 (patch)
tree8c3c57156010b8455fe76226777e3ed77b1a130b /tools/perf/scripts/python/export-to-sqlite.py
parentc8895e271f7994a3ecb13b8a280e39aa53879545 (diff)
seq_buf: Fix overflow in seq_buf_putmem_hex()
There's two variables being increased in that loop (i and j), and i follows the raw data, and j follows what is being written into the buffer. We should compare 'i' to MAX_MEMHEX_BYTES or compare 'j' to HEX_CHARS. Otherwise, if 'j' goes bigger than HEX_CHARS, it will overflow the destination buffer. Link: https://lore.kernel.org/lkml/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Cc: [email protected] Fixes: 5e3ca0ec76fce ("ftrace: introduce the "hex" output method") Signed-off-by: Yun Zhou <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions