[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: Truncated thread names in pstree
From: Mike Frysinger <vapier () gentoo ! org>
Date: 2013-06-19 15:35:34
Message-ID: 201306191135.35410.vapier () gentoo ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Friday 31 May 2013 22:54:33 Mike Frysinger wrote:
> On Friday 31 May 2013 20:34:16 Dag Wieers wrote:
> > --- busybox-1.21.0/procps/pstree.c.orig 2013-06-01 02:27:14.008530872
> > +0200 +++ busybox-1.21.0/procps/pstree.c 2013-06-01
> > 02:31:36.483537110 +0200 @@ -342,7 +342,7 @@
> >
> > 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);
> > + sprintf(threadname, "{%.*s}", COMM_LEN - 1, comm);
> > add_proc(threadname, pid, ppid, uid/*, 1*/);
> > }
>
> hmm, your change is correct all by itself (but really it should be using
> sizeof()), but i don't think the current code is correct. it *should* be
> truncating 2 bytes from the comm name.
> ...
> try this patch instead:
should be fixed in the tree now
-mike
["signature.asc" (application/pgp-signature)]
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic