File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ What's New in Python 3.3.3 release candidate 1?
1212Core and Builtins
1313-----------------
1414
15+ - Issue #18560: Fix potential NULL pointer dereference in sum().
16+
1517- Issue #15905: Fix theoretical buffer overflow in handling of sys.argv[0],
1618 prefix and exec_prefix if the operation system does not obey MAXPATHLEN.
1719
Original file line number Diff line number Diff line change @@ -2009,6 +2009,11 @@ builtin_sum(PyObject *self, PyObject *args)
20092009 }
20102010 /* Either overflowed or is not an int. Restore real objects and process normally */
20112011 result = PyLong_FromLong (i_result );
2012+ if (result == NULL ) {
2013+ Py_DECREF (item );
2014+ Py_DECREF (iter );
2015+ return NULL ;
2016+ }
20122017 temp = PyNumber_Add (result , item );
20132018 Py_DECREF (result );
20142019 Py_DECREF (item );
You can’t perform that action at this time.
0 commit comments