Some sanity verification
Needs ReviewPublic

Authored by sandsmark on Wed, Oct 2, 3:45 PM.

Details

Reviewers
aacid
cfeck
Summary

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.

Test Plan

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

Diff Detail

Repository
R287 KImageFormats
Lint
Lint Skipped
Unit
Unit Tests Skipped
sandsmark created this revision.Wed, Oct 2, 3:45 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptWed, Oct 2, 3:45 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
sandsmark requested review of this revision.Wed, Oct 2, 3:45 PM
cfeck added inline comments.Wed, Oct 2, 5:16 PM
src/imageformats/pcx.cpp
312

If p indeed could be zero, the next statements need to be in an else block (or a add a return).