From 09994a9c595b35e0ee99e69172abf8b8a1ff7994 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 20 Jul 2013 22:41:58 +0200 Subject: Check return value of flush_character_buffer() CID 486663 --- Modules/pyexpat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 01ac14e..07b1348d 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -1503,7 +1503,9 @@ xmlparse_setattro(xmlparseobject *self, PyObject *name, PyObject *v) if (self->buffer != NULL) { /* there is already a buffer */ if (self->buffer_used != 0) { - flush_character_buffer(self); + if (flush_character_buffer(self) < 0) { + return -1; + } } /* free existing buffer */ free(self->buffer); -- cgit v0.12