[Python-Dev] cpython: Fixed out-of-bounce write to rawmode buffer. The fixed size buffer wasn't

Christian Heimes lists at cheimes.de
Mon Sep 10 11:22:05 CEST 2012


Am 10.09.2012 03:50, schrieb christian.heimes:
> http://hg.python.org/cpython/rev/85cb90f79cbf
> changeset: 78946:85cb90f79cbf
> user: Christian Heimes <christian at cheimes.de>
> date: Mon Sep 10 03:50:48 2012 +0200
> summary:
> 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
>> files:
> Modules/_io/_iomodule.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>>> diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
> --- a/Modules/_io/_iomodule.c
> +++ b/Modules/_io/_iomodule.c
> @@ -229,7 +229,7 @@
> 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;

Georg,
this looks rather severe and should be included in the next release, too.
Christian


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /