Skip to content

Fix index out of bounds when processing xref stream#124

Merged
s3bk merged 2 commits intomasterfrom
unknown repository
Jan 5, 2022
Merged

Fix index out of bounds when processing xref stream#124
s3bk merged 2 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Jan 2, 2022

Not sure of the best way to go through these fuzzing bugs. I had a shot at fixing this one myself, since why let you have all the fun of fixing them :D

But you might have more context with how to fix it so I'd be happy to keep on just filing bug after bug as they're fixed, and just have you fix all of them. It would be a good idea to add regression tests for all the bugs fixed, which I've done here.

Add previous crashing pdfs to test suite
@ghost
Copy link
Author

ghost commented Jan 2, 2022

Hm, shouldn't CI be running on pull requests?

@ghost
Copy link
Author

ghost commented Jan 2, 2022

hold up forgot to add a test case for this PR

@ghost ghost marked this pull request as draft January 2, 2022 16:16
@ghost ghost marked this pull request as ready for review January 2, 2022 16:22
@s3bk s3bk merged commit c5d2dee into pdf-rs:master Jan 5, 2022
@s3bk
Copy link
Contributor

s3bk commented Jan 5, 2022

Looking good.
For the future, there is a bail!("msg", optional args..) macro that expands into return Err(PdfError::Other(...)).

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.

1 participant