mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
reader: Report malloc failure in xmlTextReaderConstValue
This commit is contained in:
parent
b8597f46df
commit
d2f623d183
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user