Commit 54923951 authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #6369: Fix an RLE decompression bug in the binhex module.

parent 48750022
...@@ -324,11 +324,11 @@ class _Rledecoderengine: ...@@ -324,11 +324,11 @@ class _Rledecoderengine:
mark = len(self.pre_buffer) mark = len(self.pre_buffer)
if self.pre_buffer[-3:] == RUNCHAR + b'\0' + RUNCHAR: if self.pre_buffer[-3:] == RUNCHAR + b'\0' + RUNCHAR:
mark = mark - 3 mark = mark - 3
elif self.pre_buffer[-1] == RUNCHAR: elif self.pre_buffer[-1:] == RUNCHAR:
mark = mark - 2 mark = mark - 2
elif self.pre_buffer[-2:] == RUNCHAR + b'\0': elif self.pre_buffer[-2:] == RUNCHAR + b'\0':
mark = mark - 2 mark = mark - 2
elif self.pre_buffer[-2] == RUNCHAR: elif self.pre_buffer[-2:-1] == RUNCHAR:
pass # Decode all pass # Decode all
else: else:
mark = mark - 1 mark = mark - 1
......
...@@ -27,6 +27,8 @@ Core and Builtins ...@@ -27,6 +27,8 @@ Core and Builtins
Library Library
------- -------
- Issue #6369: Fix an RLE decompression bug in the binhex module.
- Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument.
- The deprecated function string.maketrans has been removed. - The deprecated function string.maketrans has been removed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment