Commit a27a150e authored by Tim Peters's avatar Tim Peters

open_the_file(): Explicitly set errno to 0 before calling fopen().

parent 4279346a
...@@ -106,6 +106,7 @@ open_the_file(PyFileObject *f, char *name, char *mode) ...@@ -106,6 +106,7 @@ open_the_file(PyFileObject *f, char *name, char *mode)
"file() constructor not accessible in restricted mode"); "file() constructor not accessible in restricted mode");
return NULL; return NULL;
} }
errno = 0;
#ifdef HAVE_FOPENRF #ifdef HAVE_FOPENRF
if (*mode == '*') { if (*mode == '*') {
FILE *fopenRF(); FILE *fopenRF();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment