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

Fix panics for invalid utf-8 json streams #119

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

pratyushmittal
Copy link
Contributor

stext_page_as_json_from_page was using unwrap for reading the mupdf json stream. This was causing panic when the stream was not a valid utf-8.

The function now returns the error in such cases.

I have added the tests and the PDF where this error occurs.

`stext_page_as_json_from_page` was using `unwrap` for reading the mupdf
json stream. This was causing panic when the stream was not a valid
utf-8.

The function now returns the `error` in such cases.
@messense messense merged commit e0439e3 into messense:main Feb 21, 2025
11 checks passed
@pratyushmittal
Copy link
Contributor Author

Hey @messense, can you please release a new version? There have been many important improvements since last version.

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