a2be1b
diff -Naur procps-ng-3.3.9.orig/proc/readproc.c procps-ng-3.3.9/proc/readproc.c
a2be1b
--- procps-ng-3.3.9.orig/proc/readproc.c	2013-11-25 10:57:32.000000000 +0100
a2be1b
+++ procps-ng-3.3.9/proc/readproc.c	2014-01-24 16:20:02.222000000 +0100
a2be1b
@@ -686,6 +686,7 @@
a2be1b
     close(fd);
a2be1b
     if(n){
a2be1b
         int i=n;
a2be1b
+        while(i && dst[i-1]=='\0') --i; // skip trailing zeros
a2be1b
         while(i--)
a2be1b
             if(dst[i]=='\n' || dst[i]=='\0') dst[i]=sep;
a2be1b
         if(dst[n-1]==' ') dst[n-1]='\0';