[issue6369] binhex buggy in py3k

Antoine Pitrou report at bugs.python.org
Mon Jun 29 16:36:19 CEST 2009


New submission from Antoine Pitrou <pitrou at free.fr>:

The binhex module is buggy in py3k, witness the following example (it
works ok on trunk):

>>> binhex.binhex("README", "testA")
>>> binhex.hexbin("testA", "outA")
>>> binhex.binhex("LICENSE", "testB")
>>> binhex.hexbin("testB", "outB")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/antoine/py3k/__svn__/Lib/binhex.py", line 445, in hexbin
    ifp = HexBin(inp)
  File "/home/antoine/py3k/__svn__/Lib/binhex.py", line 364, in __init__
    self._readheader()
  File "/home/antoine/py3k/__svn__/Lib/binhex.py", line 384, in _readheader
    rest = self._read(1 + 4 + 4 + 2 + 4 + 4)
  File "/home/antoine/py3k/__svn__/Lib/binhex.py", line 367, in _read
    data = self.ifp.read(len)
  File "/home/antoine/py3k/__svn__/Lib/binhex.py", line 300, in read
    self._fill(wtd - len(self.post_buffer))
  File "/home/antoine/py3k/__svn__/Lib/binhex.py", line 337, in _fill
    binascii.rledecode_hqx(self.pre_buffer[:mark])
binascii.Error: Orphaned RLE code at start

----------
components: Library (Lib)
messages: 89842
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: binhex buggy in py3k
type: behavior
versions: Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6369>
_______________________________________


More information about the Python-bugs-list mailing list