mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
strings: use puts() rather than printf()
When running `strings` on really long strings, the stack tends to get smashed due to printf(). Switch to puts() instead since we're only passing the data through. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
b03150b52e
commit
774ce72026
1 changed files with 2 additions and 1 deletions
|
@ -29,7 +29,8 @@ int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
|
|||
|
||||
char *addr = start_addr;
|
||||
do {
|
||||
printf("%s\n", addr);
|
||||
puts(addr);
|
||||
puts("\n");
|
||||
addr += strlen(addr) + 1;
|
||||
} while (addr[0] && addr < last_addr);
|
||||
|
||||
|
|
Loading…
Reference in a new issue