pyPdf icon indicating copy to clipboard operation
pyPdf copied to clipboard

little bug in the ASCII85Decode class

Open Eladio opened this issue 14 years ago • 0 comments

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

Eladio avatar Jun 17 '11 10:06 Eladio