[Python-checkins] r58424 - python/trunk/Python/marshal.c
neal.norwitz
python-checkins at python.org
Fri Oct 12 05:05:19 CEST 2007
Author: neal.norwitz
Date: Fri Oct 12 05:05:19 2007
New Revision: 58424
Modified:
python/trunk/Python/marshal.c
Log:
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
Will backport.
Modified: python/trunk/Python/marshal.c
==============================================================================
--- python/trunk/Python/marshal.c (original)
+++ python/trunk/Python/marshal.c Fri Oct 12 05:05:19 2007
@@ -1013,6 +1013,7 @@
RFILE rf;
rf.fp = fp;
rf.strings = NULL;
+ rf.ptr = rf.end = NULL;
return r_long(&rf);
}
@@ -1086,6 +1087,7 @@
rf.fp = fp;
rf.strings = PyList_New(0);
rf.depth = 0;
+ rf.ptr = rf.end = NULL;
result = r_object(&rf);
Py_DECREF(rf.strings);
return result;
More information about the Python-checkins
mailing list