[Python-checkins] r60054 - in python/trunk: Modules/_sre.c Objects/longobject.c
christian.heimes
python-checkins at python.org
Fri Jan 18 20:12:57 CET 2008
Author: christian.heimes
Date: Fri Jan 18 20:12:56 2008
New Revision: 60054
Modified:
python/trunk/Modules/_sre.c
python/trunk/Objects/longobject.c
Log:
Silence Coverity false alerts with CIDs #172, #183, #184
Modified: python/trunk/Modules/_sre.c
==============================================================================
--- python/trunk/Modules/_sre.c (original)
+++ python/trunk/Modules/_sre.c Fri Jan 18 20:12:56 2008
@@ -2678,7 +2678,7 @@
return NULL;
n = PyList_GET_SIZE(code);
-
+ /* coverity[ampersand_in_size] */
self = PyObject_NEW_VAR(PatternObject, &Pattern_Type, n);
if (!self)
return NULL;
@@ -3185,6 +3185,7 @@
if (status > 0) {
/* create match object (with room for extra group marks) */
+ /* coverity[ampersand_in_size] */
match = PyObject_NEW_VAR(MatchObject, &Match_Type,
2*(pattern->groups+1));
if (!match)
Modified: python/trunk/Objects/longobject.c
==============================================================================
--- python/trunk/Objects/longobject.c (original)
+++ python/trunk/Objects/longobject.c Fri Jan 18 20:12:56 2008
@@ -70,6 +70,7 @@
PyErr_NoMemory();
return NULL;
}
+ /* coverity[ampersand_in_size] */
return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size);
}
More information about the Python-checkins
mailing list