Commit 8165a6b1 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

seems the reader buffer could be used while not allocated, fixes bug

* xmlreader.c: seems the reader buffer could be used while not
  allocated, fixes bug #145218
Daniel
parent d69cc817
Thu Jul 1 13:18:02 CEST 2004 Daniel Veillard <daniel@veillard.com>
* xmlreader.c: seems the reader buffer could be used while not
allocated, fixes bug #145218
Thu Jul 1 11:34:10 CEST 2004 Daniel Veillard <daniel@veillard.com>
 
* python/generator.py: do not provide functions used as destructor
......
......@@ -3294,6 +3294,13 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
(attr->children->next == NULL))
return(attr->children->content);
else {
if (reader->buffer == NULL)
reader->buffer = xmlBufferCreateSize(100);
if (reader->buffer == NULL) {
xmlGenericError(xmlGenericErrorContext,
"xmlTextReaderSetup : malloc failed\n");
return (NULL);
}
reader->buffer->use = 0;
xmlNodeBufGetContent(reader->buffer, node);
return(reader->buffer->content);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment