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

Authored by davidedmundson on Tue, Feb 12, 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.Tue, Feb 12, 5:34 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptTue, Feb 12, 5:34 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Tue, Feb 12, 5:34 PM
ngraham accepted this revision.Tue, Feb 12, 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.Tue, Feb 12, 5:37 PM
This revision was automatically updated to reflect the committed changes.