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

Improve error reporting when processing bookmark destination #44

Closed
wants to merge 1 commit into from

Conversation

salsolatragus
Copy link

When makeBookmarkParam is invoked with an empty dest array, fetching the first element without a guard will lead to an IndexOurOfBoundsException thrown by the underlying ArrayList. To prevent such obscure errors, we capture this illegal dest state and throw a more expressive exception instead.

When makeBookmarkParam is invoked with an empty dest array, fetching the
first element without a guard will lead to an IndexOurOfBoundsException thrown
by the underlying ArrayList. To prevent such obscure errors, we capture this
illegal dest state and throw a more expressive exception instead.
@iText-CI
Copy link
Contributor

Can one of the admins verify this patch?

@avlemos
Copy link

avlemos commented Apr 30, 2019

Hi @salsolatragus,

Right now itext/itextpdf has been deprecated in favor of itext/itext7, although we will continue to incorporate security fixes in itext/itextpdf (iText5).

Could you check if the issue exists in itext/itext7 so we can incorporate your fix?

Thank you for contribution, it is appreciated.

@avlemos avlemos closed this Apr 30, 2019
@salsolatragus
Copy link
Author

@andreasrosdal: thanks for the pointer, I've created LibrePDF#1

@avlemos: The class with the issue doesn't seem to exist in itext7. I assume that the problematic code was deleted with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants