Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bmp image handler: check for out of range image size
Make the decoder fail early to avoid spending time and memory on attempting to decode a corrupt image file. Change-Id: I874e04f3b43122d73f8e58c7a5bcc4a741b68264 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- Loading branch information
621ab8a
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.
@aavit Why this check?! BMP files can surely exceeds 16k x 16k pixels. Width & Height are specified as signed 32 bit integer (so no practical limit), while the file/image sizes are unsigned 32 bit integers, so the only standard pratical limit is 4GB file. Actually it's common practice to set file/image sizes to 0 (zero) for BMP bigger than 4GB.