]> granicus.if.org Git - python/commitdiff
Merged revisions 73747 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 1 Jul 2009 15:03:38 +0000 (15:03 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 1 Jul 2009 15:03:38 +0000 (15:03 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r73747 | antoine.pitrou | 2009-07-01 16:53:06 +0200 (mer., 01 juil. 2009) | 3 lines

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

Lib/binhex.py
Misc/NEWS

index 1c3f3429032667dca3939a237e76121898898372..90e59bce733dc1648f668fa61208ad8175cdaa32 100644 (file)
@@ -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
index 0b66254f5e48c5fe2dfc11c404cda1b9d0df01ad..125a5f0dfb94c84bc99d3885e8f9d3f6c4b76e4b 100644 (file)
--- 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