Fix segfault in pyexpat.c caused by 84375
u can be NULL, use XDECREF
This commit is contained in:
parent
82e6b94b95
commit
721724270d
|
@ -1129,7 +1129,7 @@ PyUnknownEncodingHandler(void *encodingHandlerData,
|
|||
|
||||
u = PyUnicode_Decode((char*) template_buffer, 256, name, "replace");
|
||||
if (u == NULL || PyUnicode_READY(u)) {
|
||||
Py_DECREF(u);
|
||||
Py_XDECREF(u);
|
||||
return XML_STATUS_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue