Add some sanity and bounds checking

Authored by sandsmark on Oct 2 2019, 3:39 PM.

Description

Add some sanity and bounds checking

Since QImage does sanity checking for overflows and stuff wrt.
dimensions and depth, check for QImage::isNull() as early as possible to
see if there's some funky business going on.

Also tried to add some checks wherever we wrote to "raw" memory.

Unit tests pass, and tested converting some files from
https://samples.ffmpeg.org/image-samples/ to pngs, and that seemed to
work.

Reviewed By: aacid

Differential Revision: https://phabricator.kde.org/D24367

Details

Committed
sandsmarkMay 10 2020, 4:06 PM
Reviewer
aacid
Differential Revision
D24367: Some sanity verification
Parents
R287:f5b26cc9f9e2: GIT_SILENT increase KF_DISABLE_DEPRECATED_BEFORE_AND_AT
Branches
Unknown
Tags
Unknown