diff options
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 0c4740b..6a532fa 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) 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); |