From 76186fb89e66963810e28c7111c76525751da43c Mon Sep 17 00:00:00 2001 From: Nicolas Cavallari Date: Mon, 5 Jul 2021 16:13:48 +0200 Subject: [PATCH] doc/reference.html: Docmument that XML_GetBuffers(parser, 0) may be NULL Allocating zero bytes with XML_GetBuffers may return NULL or a non-NULL pointer depending on the current internal buffer state (#502). Document this behavior, as it can be surprising. --- expat/doc/reference.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/expat/doc/reference.html b/expat/doc/reference.html index 309cb241..e4790eac 100644 --- a/expat/doc/reference.html +++ b/expat/doc/reference.html @@ -1115,7 +1115,8 @@ XML_GetBuffer(XML_Parser p,
Obtain a buffer of size len to read a piece of the document into. A NULL value is returned if Expat can't allocate enough memory for -this buffer. This has to be called prior to every call to +this buffer. A NULL value may also be returned if len is zero. +This has to be called prior to every call to XML_ParseBuffer. A typical use would look like this: