diff --git a/Lib/binhex.py b/Lib/binhex.py index 1c3f3429032..90e59bce733 100644 --- a/Lib/binhex.py +++ b/Lib/binhex.py @@ -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 diff --git a/Misc/NEWS b/Misc/NEWS index 0b66254f5e4..125a5f0dfb9 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -23,6 +23,8 @@ Core and Builtins 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. Build