diff Objects/longobject.c @ 48114:c4d24fc8ba8a legacy-trunk

Security patches from Apple: prevent int overflow when allocating memory
author Neal Norwitz <nnorwitz@gmail.com>
date Thu, 31 Jul 2008 17:17:14 +0000
parents 7cfc28ac0715
children 6c6a030567dd
line wrap: on
line diff
--- a/Objects/longobject.c	Thu Jul 31 15:15:45 2008 +0000
+++ b/Objects/longobject.c	Thu Jul 31 17:17:14 2008 +0000
@@ -70,6 +70,8 @@
 		return NULL;
 	}
 	/* coverity[ampersand_in_size] */
+	/* XXX(nnorwitz): This can overflow --
+           PyObject_NEW_VAR / _PyObject_VAR_SIZE need to detect overflow */
 	return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size);
 }