mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #6369: Fix an RLE decompression bug in the binhex module.
This commit is contained in:
parent
48750022c4
commit
54923951ad
2 changed files with 4 additions and 2 deletions
|
@ -324,11 +324,11 @@ class _Rledecoderengine:
|
|||
mark = len(self.pre_buffer)
|
||||
if self.pre_buffer[-3:] == RUNCHAR + b'\0' + RUNCHAR:
|
||||
mark = mark - 3
|
||||
elif self.pre_buffer[-1] == RUNCHAR:
|
||||
elif self.pre_buffer[-1:] == RUNCHAR:
|
||||
mark = mark - 2
|
||||
elif self.pre_buffer[-2:] == RUNCHAR + b'\0':
|
||||
mark = mark - 2
|
||||
elif self.pre_buffer[-2] == RUNCHAR:
|
||||
elif self.pre_buffer[-2:-1] == RUNCHAR:
|
||||
pass # Decode all
|
||||
else:
|
||||
mark = mark - 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue