From e70eb906e545cf267735db919aba7d212fdfd174 Mon Sep 17 00:00:00 2001 From: marc Date: Wed, 13 Dec 1995 17:47:15 +0000 Subject: [PATCH] fixed dumb buffer extension bug CVS patchset: 21 CVS date: 1995/12/13 17:47:15 --- lib/stringbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stringbuf.c b/lib/stringbuf.c index a1062b9..95190c1 100644 --- a/lib/stringbuf.c +++ b/lib/stringbuf.c @@ -47,7 +47,7 @@ void appendStringBufAux(StringBuf sb, char *s, int nl) l = strlen(s); /* If free == l there is no room for NULL terminator! */ - if ((l + nl) > sb->free) { + while ((l + nl) > sb->free) { sb->allocated += BUF_CHUNK; sb->free += BUF_CHUNK; sb->buf = realloc(sb->buf, sb->allocated); -- 2.7.4