mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-35062: Fix parsing _io.IncrementalNewlineDecoder's *translate* argument. (GH-10217)
_io.IncrementalNewlineDecoder's initializer possibly assigns out-of-range value to the bitwise struct field.
This commit is contained in:
parent
511747bec3
commit
b08746bfdf
3 changed files with 13 additions and 1 deletions
|
|
@ -261,7 +261,7 @@ _io_IncrementalNewlineDecoder___init___impl(nldecoder_object *self,
|
|||
}
|
||||
Py_INCREF(self->errors);
|
||||
|
||||
self->translate = translate;
|
||||
self->translate = translate ? 1 : 0;
|
||||
self->seennl = 0;
|
||||
self->pendingcr = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue