diff options
author | Rodrigo Campos <[email protected]> | 2024-02-18 16:51:04 -0300 |
---|---|---|
committer | Thomas Weißschuh <[email protected]> | 2024-04-10 23:19:01 +0200 |
commit | 34d232c39a1e05ba734dc6ad9dc01d15788cd91d (patch) | |
tree | 33e4bcb6f196cada71b615007e2568f79318b145 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 689230b674188163fe56b3aecd7d01f79ca518e6 (diff) |
tools/nolibc: Fix strlcat() return code and size usage
The return code should always be strlen(src) + strnlen(dst, size).
Let's make sure to copy at most size-1 bytes from src and null-terminate
the dst buffer if we did copied something.
While we can use strnlen() and strncpy() to implement strlcat(), this is
simple enough and results in shorter code when compiled.
Signed-off-by: Rodrigo Campos <[email protected]>
Signed-off-by: Thomas Weißschuh <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions