From: James Clark Date: Sun, 8 Feb 1998 07:58:42 +0000 (+0000) Subject: Deal with empty pool in poolAppend X-Git-Tag: REC1_0~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb791c7b7ea46a5c5762fa6bf965236af1f99478;p=libexpat Deal with empty pool in poolAppend --- diff --git a/expat/xmlparse/xmlparse.c b/expat/xmlparse/xmlparse.c index af45c805..1b371041 100755 --- a/expat/xmlparse/xmlparse.c +++ b/expat/xmlparse/xmlparse.c @@ -1504,6 +1504,8 @@ static char *poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end) { + if (!pool->ptr && !poolGrow(pool)) + return 0; for (;;) { XmlConvert(enc, XML_UTF8_ENCODING, &ptr, end, &(pool->ptr), pool->end); if (ptr == end)