[git commit] pstree: stop truncating thread names
Denys Vlasenko
vda.linux at googlemail.com
Thu Jun 27 23:55:32 UTC 2013
On Wednesday 19 June 2013 17:29, Mike Frysinger wrote:
> static void handle_thread(const char *comm, pid_t pid, pid_t ppid, uid_t uid)
> {
> - char threadname[COMM_LEN + 2];
> - sprintf(threadname, "{%.*s}", COMM_LEN - 2, comm);
> + char threadname[COMM_DISP_LEN + 1];
> + sprintf(threadname, "{%.*s}", (int)sizeof(threadname) - 1, comm);
??
The size should be (int)sizeof(threadname) - 3
More information about the busybox
mailing list