Message240015
Hello All,
In reviewing code in directory Python-3.4.3/Modules, file
'mmapmodule', I found a call to 'lseek()' without a check for
a return value of -1, indicating failure. The patch file below
corrects this issue (diff -u format):
--- mmapmodule.c.orig 2015-04-02 19:05:30.380554538 -0700
+++ mmapmodule.c 2015-04-02 19:11:00.320488207 -0700
@@ -1335,7 +1335,11 @@
return NULL;
}
/* Win9x appears to need us seeked to zero */
- lseek(fileno, 0, SEEK_SET);
+ if (lseek(fileno, 0, SEEK_SET) == -1) { /* call to lseek() failed */
+ PyErr_SetFromErrno(PyExc_OSError);
+ return NULL;
+ }
+
}
m_obj = (mmap_object *)type->tp_alloc(type, 0);
I am attaching the patch file to this bug report... |
|
Date |
User |
Action |
Args |
2015-04-03 17:44:00 | dogbert2 | set | recipients:
+ dogbert2 |
2015-04-03 17:44:00 | dogbert2 | set | messageid: <1428083040.47.0.668729418368.issue23860@psf.upfronthosting.co.za> |
2015-04-03 17:44:00 | dogbert2 | link | issue23860 messages |
2015-04-03 17:44:00 | dogbert2 | create | |
|