summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-07-01 15:03:38 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-07-01 15:03:38 (GMT)
commit53f4ed7da522527768bdcf5f199cdd11701b9c38 (patch)
treec796de730d2e26f05d4d958c74139cd9732db47e
parent731371268e62608725267f127e228f777153fe49 (diff)
downloadcpython-53f4ed7da522527768bdcf5f199cdd11701b9c38.zip
cpython-53f4ed7da522527768bdcf5f199cdd11701b9c38.tar.gz
cpython-53f4ed7da522527768bdcf5f199cdd11701b9c38.tar.bz2
Merged revisions 73747 via svnmerge from
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. ........
-rw-r--r--Lib/binhex.py4
-rw-r--r--Misc/NEWS2
2 files changed, 4 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
diff --git a/Misc/NEWS b/Misc/NEWS
index 0b66254..125a5f0 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