Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
convertbmp: detect invalid file dimensions early
width/length dimensions read from bmp headers are not necessarily valid. For instance they may have been maliciously set to very large values with the intention to cause DoS (large memory allocation, stack overflow). In these cases we want to detect the invalid size as early as possible. This commit introduces a counter which verifies that the number of written bytes corresponds to the advertized width/length. Fixes uclouvain#1059 (CVE-2018-6616).
- Loading branch information