diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-10-12 03:05:19 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-10-12 03:05:19 (GMT) |
commit | 15f26617587cbe53b22c599239767ef95341472f (patch) | |
tree | b1398026f9f8a29d733014ecda2714f73e10d963 /Python | |
parent | a7d329a9b2d01895cb2e6b695ead74855bfeb02a (diff) | |
download | cpython-15f26617587cbe53b22c599239767ef95341472f.zip cpython-15f26617587cbe53b22c599239767ef95341472f.tar.gz cpython-15f26617587cbe53b22c599239767ef95341472f.tar.bz2 |
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
Will backport.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/marshal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index eac4616..897c15e 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -1013,6 +1013,7 @@ PyMarshal_ReadLongFromFile(FILE *fp) RFILE rf; rf.fp = fp; rf.strings = NULL; + rf.ptr = rf.end = NULL; return r_long(&rf); } @@ -1086,6 +1087,7 @@ PyMarshal_ReadObjectFromFile(FILE *fp) 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; |