diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-07-01 14:53:06 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-07-01 14:53:06 (GMT) |
commit | 54923951ad1bdd33028f94ed337e1a0473366605 (patch) | |
tree | 74b3dba35b08597266d03b1d8e5736e174af2d48 /Lib/binhex.py | |
parent | 48750022c45d6fa9f99b815dca389e930010228a (diff) | |
download | cpython-54923951ad1bdd33028f94ed337e1a0473366605.zip cpython-54923951ad1bdd33028f94ed337e1a0473366605.tar.gz cpython-54923951ad1bdd33028f94ed337e1a0473366605.tar.bz2 |
Issue #6369: Fix an RLE decompression bug in the binhex module.
Diffstat (limited to 'Lib/binhex.py')
-rw-r--r-- | Lib/binhex.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/binhex.py b/Lib/binhex.py index 1c3f342..90e59bc 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 |