Update of /cvsroot/cvs-nserver/cvs-nserver/lib
In directory usw-pr-cvs1:/tmp/cvs-serv9020
Modified Files:
Tag: NCLI-1-11-1
stringbuf.c
Log Message:
BUGFIX: 'trailing zero' bug is fixed
Index: stringbuf.c
===================================================================
RCS file: /cvsroot/cvs-nserver/cvs-nserver/lib/Attic/stringbuf.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- stringbuf.c 23 Jun 2002 12:55:53 -0000 1.1.2.1
+++ stringbuf.c 25 Sep 2002 07:21:50 -0000 1.1.2.2
@@ -118,7 +118,7 @@
if (len == 0)
return buf;
- if (buf->len + len > buf->allocated) {
+ if (buf->len + len >= buf->allocated) {
size_t needs_to_allocate = buf->allocated + len * 2 + 1;
char *tmp = (char *) realloc(buf->buf, needs_to_allocate);
if (tmp == NULL)
|