projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b03150b
)
strings: use puts() rather than printf()
author
Mike Frysinger
<vapier@gentoo.org>
Tue, 4 Nov 2008 21:03:46 +0000
(16:03 -0500)
committer
Wolfgang Denk
<wd@denx.de>
Sun, 7 Dec 2008 00:17:19 +0000
(
01:17
+0100)
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>
common/cmd_strings.c
patch
|
blob
|
history
diff --git
a/common/cmd_strings.c
b/common/cmd_strings.c
index db54f29e265686d509693ddbf4bdebf3bf2a4364..7d05cf8e938d10616070fefccfcc65f75b4bdfb7 100644
(file)
--- a/
common/cmd_strings.c
+++ b/
common/cmd_strings.c
@@
-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);