Skip to content

Conversation

@mlaukala
Copy link

@mlaukala mlaukala commented Nov 2, 2017

Fixes invalid byte offset values for startxref and xref object offsets when bytes precede '%PDF-'.

@mlaukala
Copy link
Author

mlaukala commented Nov 6, 2017

ScanNextToken() will usually crash if it finds itself inside of a stream due to unexpected characters. Currently, my added function IsValidXref() uses ScanNextToken() to determine if the next token is an 'xref' token. This is used to determine if a fix needs to be made. However, if startxref is wrong, the _lexer.Position could be inside of a stream which will more than likely cause an exception.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants