diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-22 15:37:16 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-22 15:37:16 +0100 |
commit | 11f3a8b7ed366b23e4740fc847662a971cf65de3 (patch) | |
tree | e5b28d46626a2097429a076cd1d30aa29b0c9ae9 /coreutils/od_bloaty.c | |
parent | b1585064fdac138b3bd14c2b64f64c67ec08b654 (diff) | |
download | busybox-w32-11f3a8b7ed366b23e4740fc847662a971cf65de3.tar.gz busybox-w32-11f3a8b7ed366b23e4740fc847662a971cf65de3.tar.bz2 busybox-w32-11f3a8b7ed366b23e4740fc847662a971cf65de3.zip |
od: fix -tx without length spec
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/od_bloaty.c')
-rw-r--r-- | coreutils/od_bloaty.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c index 0c4740b47..6a532fa9d 100644 --- 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) | |||
545 | 545 | ||
546 | c = *s++; | 546 | c = *s++; |
547 | p = strchr(CSIL, *s); | 547 | p = strchr(CSIL, *s); |
548 | if (!p) { | 548 | /* if *s == NUL, p != NULL! Testcase: "od -tx" */ |
549 | if (!p || *p == '\0') { | ||
549 | size = sizeof(int); | 550 | size = sizeof(int); |
550 | if (isdigit(s[0])) { | 551 | if (isdigit(s[0])) { |
551 | size = bb_strtou(s, &end, 0); | 552 | size = bb_strtou(s, &end, 0); |