Mercurial > cpython-lru_cache-weakref
diff Python/marshal.c @ 43538:a44e4cc33f5e 2.5
Backport 58424:
Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memory
would be accessed.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Fri, 12 Oct 2007 03:59:09 +0000 |
| parents | 5d9dd1b8d908 |
| children | 38432860b3b4 |
line wrap: on
line diff
--- a/Python/marshal.c Tue Oct 09 07:25:24 2007 +0000 +++ b/Python/marshal.c Fri Oct 12 03:59:09 2007 +0000 @@ -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;
