Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utils: Avoid overwriting the end of a buffer with jpeg_decode()
Odd that this bug has existed for so long, but it is partly due to the fact that with modern scanners we get an entire JPEG from the file, rather than the tiled JPEGs we create ourselves. When a JPEG image height is not a multiple of 16. the JPEG format requires that it be encoded expanded to the nearest multiple. When decoding we must ignore anything beyond the end of the image, otherwise we will write beyond the end of the buffer. Fix this.
- Loading branch information
Showing
3 changed files
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters