reader: Report malloc failure in xmlTextReaderConstValue

This commit is contained in:
Nick Wellnhofer 2024-04-30 16:36:44 +02:00
parent b8597f46df
commit d2f623d183

View File

@ -3640,12 +3640,12 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
xmlBufGetNodeContent(reader->buffer, node);
ret = xmlBufContent(reader->buffer);
if (ret == NULL) {
xmlTextReaderErrMemory(reader);
/* error on the buffer best to reallocate */
xmlBufFree(reader->buffer);
reader->buffer = xmlBufCreateSize(100);
xmlBufSetAllocationScheme(reader->buffer,
XML_BUFFER_ALLOC_DOUBLEIT);
ret = BAD_CAST "";
}
return(ret);
}