X-Gentoo-Bug: 279819 Upstream-Patch: http://procps.cvs.sourceforge.net/viewvc/procps/procps/top.c?r1=1.132&r2=1.134 --- top.c 2008/03/24 04:41:26 1.132 +++ top.c 2009/12/10 11:37:48 1.134 @@ -2190,7 +2190,10 @@ // Value a window's name and make the associated group name. static void win_names (WIN_t *q, const char *name) { - sprintf(q->rc.winname, "%.*s", WINNAMSIZ -1, name); + // Note that src==dst is illegal in sprintf. + // Failure: amd64, glibc 2.9-20081201, gcc 4.3.4 + if(q->rc.winname != name) + sprintf(q->rc.winname, "%.*s", WINNAMSIZ -1, name); sprintf(q->grpname, "%d:%.*s", q->winnum, WINNAMSIZ -1, name); }