[SSI] openssi/procps/proc readproc.c,1.1.15.1,1.1.15.2
Roger Tsang <[email protected]> Sun, 08 Aug 2010 03:34:01 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/procps/proc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv9307/proc
Modified Files:
Tag: CENTOS
readproc.c
Log Message:
Import from procps-3.2.3-8.17.el4_8.2 for CentOS 4
Index: readproc.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/procps/proc/Attic/readproc.c,v
retrieving revision 1.1.15.1
retrieving revision 1.1.15.2
diff -u -d -r1.1.15.1 -r1.1.15.2
--- readproc.c 4 Jul 2010 21:36:48 -0000 1.1.15.1
+++ readproc.c 8 Aug 2010 03:33:58 -0000 1.1.15.2
@@ -402,7 +402,7 @@
close(fd);
return NULL; /* read error */
}
- if (end_of_file && buf[n-1]) /* last read char not null */
+ if (end_of_file && (n == 0 || buf[n-1])) /* last read char not null */
buf[n++] = '\0'; /* so append null-terminator */
rbuf = xrealloc(rbuf, tot + n); /* allocate more memory */
memcpy(rbuf + tot, buf, n); /* copy buffer into it */
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev