C-API
-----
+- Issue #9834: Don't segfault in PySequence_GetSlice, PySequence_SetSlice, or
+ PySequence_DelSlice when the object doesn't have any mapping operations
+ defined.
+
- Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows
embedders of the interpreter to set sys.argv without also modifying
sys.path. This helps fix `CVE-2008-5983
if (!s) return null_error();
mp = s->ob_type->tp_as_mapping;
- if (mp->mp_subscript) {
+ if (mp && mp->mp_subscript) {
PyObject *res;
PyObject *slice = _PySlice_FromIndices(i1, i2);
if (!slice)
}
mp = s->ob_type->tp_as_mapping;
- if (mp->mp_ass_subscript) {
+ if (mp && mp->mp_ass_subscript) {
int res;
PyObject *slice = _PySlice_FromIndices(i1, i2);
if (!slice)
}
mp = s->ob_type->tp_as_mapping;
- if (mp->mp_ass_subscript) {
+ if (mp && mp->mp_ass_subscript) {
int res;
PyObject *slice = _PySlice_FromIndices(i1, i2);
if (!slice)