On Thursday 27 June 2013 19:55:32 Denys Vlasenko wrote:
> 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

yeah, i was thinking about the NUL.  well, fixed one bug by adding another :).
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to