mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
be more defensive in the xmlReader python bindings fixing bug #124044
* python/libxml.c: be more defensive in the xmlReader python bindings fixing bug #124044 Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Thu Oct 30 14:10:42 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* python/libxml.c: be more defensive in the xmlReader python bindings
|
||||||
|
fixing bug #124044
|
||||||
|
|
||||||
Thu Oct 30 11:14:31 CET 2003 Daniel Veillard <daniel@veillard.com>
|
Thu Oct 30 11:14:31 CET 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* valid.c: the a-posteriori DTD validation code was not validating
|
* valid.c: the a-posteriori DTD validation code was not validating
|
||||||
|
@ -1644,9 +1644,17 @@ libxml_xmlFreeTextReader(ATTRIBUTE_UNUSED PyObject *self, PyObject *args) {
|
|||||||
xmlTextReaderErrorFunc f;
|
xmlTextReaderErrorFunc f;
|
||||||
void *arg;
|
void *arg;
|
||||||
|
|
||||||
|
if (self == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return(Py_None);
|
||||||
|
}
|
||||||
if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeTextReader", &pyobj_reader))
|
if (!PyArg_ParseTuple(args, (char *)"O:xmlFreeTextReader", &pyobj_reader))
|
||||||
return(NULL);
|
return(NULL);
|
||||||
reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
|
reader = (xmlTextReaderPtr) PyxmlTextReader_Get(pyobj_reader);
|
||||||
|
if (reader == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return(Py_None);
|
||||||
|
}
|
||||||
|
|
||||||
xmlTextReaderGetErrorHandler(reader,&f,&arg);
|
xmlTextReaderGetErrorHandler(reader,&f,&arg);
|
||||||
if (arg != NULL) {
|
if (arg != NULL) {
|
||||||
|
Reference in New Issue
Block a user