← Commit list

3106784e6

Denys Vlasenko
Denys Vlasenko
2019-05-03
FAILED Duration: 114s

Subject

ps: ensure fields are separated by at least one space, closes 11826

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 →

procps/ps.c+1 -1
@@ -533,7 +533,7 @@ static void format_process(const procps_status_t *ps)
len = out[i].width - len + 1;
if (++i == out_cnt) /* do not pad last field */
break;
- p += sprintf(p, "%*s", len, "");
+ p += sprintf(p, "%*s", len, " "); /* " ", not "", to ensure separation of fields */
}
printf("%.*s\n", terminal_width, buffer);
}