-
-
Notifications
You must be signed in to change notification settings - Fork 852
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
Tiff decoding robustness improvements #2550
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One suggestion, otherwise LGTM.
{ | ||
return totalBytesRead; | ||
} | ||
|
||
totalBytesRead += bytesRead; | ||
} | ||
|
||
return totalBytesRead; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are already touching this class: we should check the return value of this.innerStream.Read
in InitializeInflateStream
when it's skipping 4 bytes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed the change together with another check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good changes. Thanks!
(accidental push to unprotected branch)
Prerequisites
Description
Adds additional checks to the decoder infrastructure to enable us to better handle corrupt files.
Some light formatting cleanup also.