mfenniak / pyPdf

Pure-Python PDF Library; this repository is no longer maintained, please see https://github.com/knowah/PyPDF2/ insead.
https://github.com/knowah/PyPDF2/
Other
276 stars 85 forks source link

little bug in the ASCII85Decode class #25

Open Eladio opened 13 years ago

Eladio commented 13 years ago

Hi! I'm Biszak Előd, I'm a hungarian developer, I've been using pyPdf and realized there's a bug int the ASCII85Decode class' decode function. When c=='z' the variable x doesn't increment, so the function remains in an infinite loop.

elif c == 'z':
    assert len(group) == 0
    retval += '\x00\x00\x00\x00'
    continue

should be:

elif c == 'z':
    assert len(group) == 0
    retval += '\x00\x00\x00\x00'
    x += 1
    continue