[Python-checkins] cpython (3.2): Closes #15897: zipimport.c doesn't check return value of fseek(). Typo
jesus.cea
python-checkins at python.org
Wed Oct 3 03:19:12 CEST 2012
http://hg.python.org/cpython/rev/0f4d4f4db724
changeset: 79426:0f4d4f4db724
branch: 3.2
parent: 79421:6b3d7c64d465
user: Jesus Cea <jcea at jcea.es>
date: Wed Oct 03 03:16:42 2012 +0200
summary:
Closes #15897: zipimport.c doesn't check return value of fseek(). Typo
files:
Modules/zipimport.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Modules/zipimport.c b/Modules/zipimport.c
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -744,7 +744,7 @@
if (fseek(fp, -22, SEEK_END) == -1) {
fclose(fp);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
+ PyErr_Format(ZipImportError, "can't read Zip file: %U", archive_obj);
return NULL;
}
header_position = ftell(fp);
@@ -861,7 +861,7 @@
fclose(fp);
Py_XDECREF(files);
Py_XDECREF(nameobj);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
+ PyErr_Format(ZipImportError, "can't read Zip file: %U", archive_obj);
return NULL;
error:
fclose(fp);
@@ -934,7 +934,7 @@
/* Check to make sure the local file header is correct */
if (fseek(fp, file_offset, 0) == -1) {
fclose(fp);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
+ PyErr_Format(ZipImportError, "can't read Zip file: %U", archive);
return NULL;
}
@@ -949,7 +949,7 @@
}
if (fseek(fp, file_offset + 26, 0) == -1) {
fclose(fp);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
+ PyErr_Format(ZipImportError, "can't read Zip file: %U", archive);
return NULL;
}
@@ -973,7 +973,7 @@
bytes_read = fread(buf, 1, data_size, fp);
} else {
fclose(fp);
- PyErr_Format(ZipImportError, "can't read Zip file: %R", archive);
+ PyErr_Format(ZipImportError, "can't read Zip file: %U", archive);
return NULL;
}
fclose(fp);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list