Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: fix address sanitizer crash on
find
Fix the following address sanitizer crash when running the command `find`: ==163468==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0x7fff4840fc1d at pc 0x7f4311742d11 bp 0x7fff4840fbc0 sp 0x7fff4840fb b0 WRITE of size 1 at 0x7fff4840fc1d thread T0 #0 0x7f4311742d10 in print_cmd ../lib/command.c:1541 #1 0x7f4311746274 in cmd_find_cmds ../lib/command.c:2364 #2 0x560b18b4c222 in find ../vtysh/vtysh.c:3732 #3 0x7f431174043a in cmd_execute_command_real ../lib/command.c:995 #4 0x7f43117407d3 in cmd_execute_command ../lib/command.c:1055 #5 0x7f4311741446 in cmd_execute ../lib/command.c:1219 #6 0x560b18b426c7 in vtysh_execute_func ../vtysh/vtysh.c:486 #7 0x560b18b43575 in vtysh_execute ../vtysh/vtysh.c:671 #8 0x560b18b409b4 in main ../vtysh/vtysh_main.c:721 #9 0x7f43113c90b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #10 0x560b18b3e64d in _start (/usr/bin/vtysh+0x21f64d) Signed-off-by: Rafael Zalamena <[email protected]>
- Loading branch information