Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89ff3c7

Browse files
committed
Fixed out-of-bounce write to rawmode buffer. The fixed size buffer wasn't enlarged for the new 'x' flag. The buffer may contain the 5 flags xrwa+ and the \0 byte
1 parent 310f814 commit 89ff3c7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_io/_iomodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds)
229229
int creating = 0, reading = 0, writing = 0, appending = 0, updating = 0;
230230
int text = 0, binary = 0, universal = 0;
231231

232-
char rawmode[5], *m;
232+
char rawmode[6], *m;
233233
int line_buffering, isatty;
234234

235235
PyObject *raw, *modeobj = NULL, *buffer = NULL, *wrapper = NULL;

0 commit comments

Comments
 (0)