commit | 4f3be8a0a908784f4ab5fec66439643f2c1d79eb | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Thu Jul 31 17:08:14 2008 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Thu Jul 31 17:08:14 2008 +0000 |
tree | 0d7f0d95099fd0b5e93e2f994a3fc0db6b682b29 | |
parent | 83ac0144fa3041556aa4f3952ebd979e0189a19c [diff] [blame] |
Security patches from Apple: prevent int overflow when allocating memory
diff --git a/Objects/longobject.c b/Objects/longobject.c index e51517f..b6cb61a 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c
@@ -70,6 +70,8 @@ PyErr_NoMemory(); return NULL; } + /* XXX(nnorwitz): This can overflow -- + PyObject_NEW_VAR / _PyObject_VAR_SIZE need to detect overflow */ return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size); }