* when reallocing the buffer, flush the external pointer
authorWilfried Göesgens <willi@citadel.org>
Mon, 16 Nov 2009 20:27:33 +0000 (20:27 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 16 Nov 2009 20:27:33 +0000 (20:27 +0000)
libcitadel/lib/stringbuf.c

index 88c984ae5961e07f71e504856169d1c68a817108..44a4fde95f9f657d6621de1d697f12ff9ba8a0e8 100644 (file)
@@ -2151,6 +2151,7 @@ int StrBufTCP_read_buffered_line_fast(StrBuf *Line,
                        IOBuf->buf[IOBuf->BufUsed] = '\0';
                        if (IOBuf->BufUsed + 10 > IOBuf->BufSize) {
                                IncreaseBuf(IOBuf, 1, -1);
+                               *Pos = NULL;
                        }
                        
                        pche = IOBuf->buf + IOBuf->BufUsed;