We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2894073 + 27c4c3e commit 7bc80fcCopy full SHA for 7bc80fc
1 file changed
Python/dynload_shlib.c
@@ -81,7 +81,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
81
if (fp != NULL) {
82
int i;
83
struct stat statb;
84
- fstat(fileno(fp), &statb);
+ if (fstat(fileno(fp), &statb) == -1) {
85
+ return PyErr_SetFromErrno(PyExc_IOError);
86
+ }
87
for (i = 0; i < nhandles; i++) {
88
if (statb.st_dev == handles[i].dev &&
89
statb.st_ino == handles[i].ino) {
0 commit comments