cpython: c89fe7dc22ee (original) (raw)
Mercurial > cpython
changeset 78669:c89fe7dc22ee
Closes #15737: Fix potential NULL dereference in zipimport.c. [#15737]
Stefan Krah skrah@bytereef.org | |
---|---|
date | Mon, 20 Aug 2012 14:14:49 +0200 |
parents | 2af78f8a98e1 |
children | 5b1b9cfb7fe8 |
files | Modules/zipimport.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-)[+] [-] Modules/zipimport.c 4 |
line wrap: on
line diff
--- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -947,8 +947,6 @@ read_directory(PyObject *archive) else charset = "cp437"; nameobj = PyUnicode_Decode(name, name_size, charset, NULL);
if (PyUnicode_READY(nameobj) == -1)[](#l1.7)
goto error;[](#l1.8) if (nameobj == NULL) {[](#l1.9) if (bootstrap)[](#l1.10) PyErr_Format(PyExc_NotImplementedError,[](#l1.11)
@@ -957,6 +955,8 @@ read_directory(PyObject *archive) PY_MAJOR_VERSION, PY_MINOR_VERSION); goto error; }
if (PyUnicode_READY(nameobj) == -1)[](#l1.16)
goto error;[](#l1.17) path = PyUnicode_FromFormat("%U%c%U", archive, SEP, nameobj);[](#l1.18) if (path == NULL)[](#l1.19) goto error;[](#l1.20)