projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b158506
)
od: fix -tx without length spec
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 22 Nov 2009 14:37:16 +0000
(15:37 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 22 Nov 2009 14:37:16 +0000
(15:37 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/od_bloaty.c
patch
|
blob
|
history
diff --git
a/coreutils/od_bloaty.c
b/coreutils/od_bloaty.c
index 0c4740b47cfefcabfb75eb8636b65b248f89d95e..6a532fa9daeb70e6a68b1007175d3453e43b4b6a 100644
(file)
--- a/
coreutils/od_bloaty.c
+++ b/
coreutils/od_bloaty.c
@@
-545,7
+545,8
@@
decode_one_format(const char *s_orig, const char *s, struct tspec *tspec)
c = *s++;
p = strchr(CSIL, *s);
- if (!p) {
+ /* if *s == NUL, p != NULL! Testcase: "od -tx" */
+ if (!p || *p == '\0') {
size = sizeof(int);
if (isdigit(s[0])) {
size = bb_strtou(s, &end, 0);