Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion error in function ASCII85Decode.decode #312

Closed
Erez-Panda opened this issue Dec 20, 2016 · 0 comments · Fixed by #729
Closed

Assertion error in function ASCII85Decode.decode #312

Erez-Panda opened this issue Dec 20, 2016 · 0 comments · Fixed by #729
Labels
is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF

Comments

@Erez-Panda
Copy link

File filters.py, class ASCII85Decode:
line 313: assert b < (2**32 - 1)

If the b value is exactly (2^32 - 1), which is legal value, assertion will fail.

I believe assertion should include (2^32 - 1) meaning:

assert b <= (232 - 1)
or
assert b < (2
32 )

@MartinThoma MartinThoma added the is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF label Apr 7, 2022
@MartinThoma MartinThoma linked a pull request Apr 9, 2022 that will close this issue
MartinThoma added a commit that referenced this issue Apr 10, 2022
BUG: Off-by-one
FIX: Set 2**32-1 inclusive

Closes #312

Credits to Michael Sander (speedplane) who
included it here:
#333
MartinThoma added a commit that referenced this issue Apr 10, 2022
BUG: Off-by-one
FIX: Set 2**32-1 inclusive

Closes #312

Credits to Michael Sander (speedplane) who
included it here:
#333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF
Projects
None yet
2 participants