diff options
author | Christian Heimes <christian@cheimes.de> | 2012-09-10 03:50:48 +0200 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2012-09-10 03:50:48 +0200 |
commit | 19606411d32fb0f8107f2d7843cfe0f96cc48338 (patch) | |
tree | 231d947d901bce297038904051ba30879c3561e3 | |
parent | bdc7e69f42fbb769f96fb970c9883a9a0c953b71 (diff) | |
download | cpython-git-19606411d32fb0f8107f2d7843cfe0f96cc48338.tar.gz |
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
-rw-r--r-- | Modules/_io/_iomodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c index 15781ac32e..0622c58181 100644 --- a/Modules/_io/_iomodule.c +++ b/Modules/_io/_iomodule.c @@ -229,7 +229,7 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds) int creating = 0, reading = 0, writing = 0, appending = 0, updating = 0; int text = 0, binary = 0, universal = 0; - char rawmode[5], *m; + char rawmode[6], *m; int line_buffering, isatty; PyObject *raw, *modeobj = NULL, *buffer = NULL, *wrapper = NULL; |