[Python-checkins] r53907 - in python/branches/release25-maint: Misc/NEWS Python/ceval.c
neal.norwitz
python-checkins at python.org
Sun Feb 25 17:19:24 CET 2007
Author: neal.norwitz
Date: Sun Feb 25 17:19:21 2007
New Revision: 53907
Modified:
python/branches/release25-maint/Misc/NEWS
python/branches/release25-maint/Python/ceval.c
Log:
Backport 53901 and 53902 to prevent crash when there is an error decoding unicode filenames
Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS (original)
+++ python/branches/release25-maint/Misc/NEWS Sun Feb 25 17:19:21 2007
@@ -124,6 +124,8 @@
- The version number of the ctypes package was changed to "1.0.2".
+- Bug #1664966: Fix crash in exec if Unicode filename can't be decoded.
+
- Patch #1544279: Improve thread-safety of the socket module by moving
the sock_addr_t storage out of the socket object.
Modified: python/branches/release25-maint/Python/ceval.c
==============================================================================
--- python/branches/release25-maint/Python/ceval.c (original)
+++ python/branches/release25-maint/Python/ceval.c Sun Feb 25 17:19:21 2007
@@ -4173,6 +4173,8 @@
FILE *fp = PyFile_AsFile(prog);
char *name = PyString_AsString(PyFile_Name(prog));
PyCompilerFlags cf;
+ if (name == NULL)
+ return -1;
cf.cf_flags = 0;
if (PyEval_MergeCompilerFlags(&cf))
v = PyRun_FileFlags(fp, name, Py_file_input, globals,
More information about the Python-checkins
mailing list