fix [#29319] bus error with python with link_append and {}
patch from Emil Brink
This commit is contained in:
@@ -385,8 +385,12 @@ const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
|
||||
if (PyBytes_Check(py_str)) {
|
||||
return PyBytes_AS_STRING(py_str);
|
||||
}
|
||||
else if ((*coerce= PyUnicode_EncodeFSDefault(py_str))) {
|
||||
return PyBytes_AS_STRING(*coerce);
|
||||
}
|
||||
else {
|
||||
return PyBytes_AS_STRING((*coerce= PyUnicode_EncodeFSDefault(py_str)));
|
||||
/* leave error raised from EncodeFS */
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user