ps: ensure fields are separated by at least one space, closes 11826
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/procps/ps.c b/procps/ps.c
index 54e6c40..815c115 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -533,7 +533,7 @@
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);
}