Issue 3790: in zlib decompressor objects, unused_data and unconsumed_tail must be immutable

Issue3790

Created on 2008-09-06 00:16 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
zlib_unconsumed_tail.patch pitrou, 2008-09-06 00:16
Messages (2)
msg72652 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-09-06 00:16
Currently (in py3k), the attributes "unused_data" and "unconsumed_tail"
on zlib decompressor objects are bytearrays. This can wreak havoc in the
read() method of ZipInfo objects, because one of those bytearrays is
assigned to the internal "rawbuffer" and then extended using "+="...
leading to wrong results (right now I can only reproduce it on a 3.5 GB
zip file, sorry :-( ).

Here is a patch.
msg72687 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-09-06 20:15
fixed in r66266 along with #3492.
History
Date User Action Args
2022-04-11 14:56:38adminsetgithub: 48040
2008-09-06 20:15:27gregory.p.smithsetstatus: open -> closed
resolution: fixed
messages: + msg72687
keywords: patch, patch, needs review
2008-09-06 17:48:42gregory.p.smithsetkeywords: patch, patch, needs review
assignee: gregory.p.smith
nosy: + gregory.p.smith
2008-09-06 00:16:30pitroucreate