Skip to content

python: return None if PY_IMPORT_STRING returns NULL

Mike Gorse requested to merge mgorse/libxml2:master into master

PY_IMPORT_STRING might return NULL on python 3 if, ie, a string can't be encoded. We should check for this and return None, rather than returning NULL. Fixes a NULL pointer dereference when reporting an error with an invalid string.

Merge request reports