Guard KCompressionDevice::open being called with no backend available
ClosedPublic

Authored by davidedmundson on Feb 12 2019, 5:34 PM.

Details

Summary

If KArchive is built without support for a compression type, such as
bzip2, d->filter ends up as null.

It is then used in the open call and will crash.

Other calls can still crash, but they shouldn't be being called if open
fails.

BUG: 404240

Diff Detail

Repository
R243 KArchive
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Feb 12 2019, 5:34 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 12 2019, 5:34 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Feb 12 2019, 5:34 PM
ngraham accepted this revision.Feb 12 2019, 5:37 PM
ngraham added reviewers: Plasma, Frameworks.
ngraham added a subscriber: ngraham.

Fixes the crash for me and makes logical sense.

This revision is now accepted and ready to land.Feb 12 2019, 5:37 PM
This revision was automatically updated to reflect the committed changes.