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

Some PDF files crashes #292

Closed
tomswinkels opened this issue Feb 26, 2021 · 7 comments
Closed

Some PDF files crashes #292

tomswinkels opened this issue Feb 26, 2021 · 7 comments

Comments

@tomswinkels
Copy link

With some PDF files the plugin crashes.

When i remove the '&' caracter in the getid3_pdf class the file works, but other files also work as well with the '&' character.

$info = &$this->getid3->info; to $info = $this->getid3->info;

See the attach file.
formulier-taak-herexamen.pdf

JamesHeinrich added a commit that referenced this issue Feb 26, 2021
@JamesHeinrich
Copy link
Owner

Fixed in 80c5578

@tomswinkels
Copy link
Author

@JamesHeinrich can you make a new release with that fix?

@zerocrates
Copy link

Even with this change I'm still seeing infinite looping on at least some PDFs. ftell seems to move all over the place so it's a higher level than just this inner loop, I guess.

@JamesHeinrich
Copy link
Owner

Do you have a non-sensitive PDF that shows this problem you can send me (info@getid3.org) for testing?

@JamesHeinrich JamesHeinrich reopened this Apr 23, 2021
@zerocrates
Copy link

I'm checking with the user I got my example from; I'll pass it along if they give me a thumbs-up to send it.

@JamesHeinrich
Copy link
Owner

Thanks for the sample file, I can at least reproduce the infinite-loop behaviour. I may not be able to look at the issue for a couple days but I'll investigate what's causing the problem and let you know.

JamesHeinrich added a commit that referenced this issue May 9, 2021
@JamesHeinrich
Copy link
Owner

So it turns out the PDF specification is a little more "flexible" (read: poorly standardized) than I had thought and the existing parsing code was not finding what it was looking for. I have rewritten that section and it should be a bit more robust now.
a5f31b3
Please reopen this ticket if you find more PDFs that cause problems.

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

No branches or pull requests

3 participants