Skip to content

fix: handle EOF and ] keyword - #64

Open
yama6a wants to merge 1 commit into
ledongthuc:masterfrom
yama6a:master
Open

fix: handle EOF and ] keyword#64
yama6a wants to merge 1 commit into
ledongthuc:masterfrom
yama6a:master

Conversation

@yama6a

@yama6a yama6a commented Jan 15, 2026

Copy link
Copy Markdown

Hi there,

I stumbled upon an issue with the library not gracefully handling EOF and the "]" keyword. Here's a PR to fix that problem.

The lib doesn't have any tests, so I didn't add any to this PR, assuming that's on purpose, but I attached them here to this PR for reference. Also, here's a PDF file that failed previously before this fix.

Archive.zip

@yama6a yama6a changed the title handle EOF and ] keyword fix: handle EOF and ] keyword Jan 15, 2026
@asciimoo

asciimoo commented Jun 9, 2026

Copy link
Copy Markdown

This is an important fix. Not handling the EOF can cause infinite memory allocations and a visit from the OOM killer. Please merge this PR.

@asciimoo

Copy link
Copy Markdown

Due to lack of response, I've forked the repo and applied the changes: https://github.com/asciimoo/pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants