← Commit list

11f3a8b7e

Denys Vlasenko
Denys Vlasenko
2009-11-22
FAILED Duration: 36s

Subject

od: fix -tx without length spec

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/od_bloaty.c+2 -1
@@ -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);