feverfew created this revision. feverfew added reviewers: akrutzler, dfaure, elvisangelaccio. Herald added projects: Dolphin, Frameworks. Herald added subscribers: kfm-devel, kde-frameworks-devel. feverfew requested review of this revision.
REVISION SUMMARY A null pointer can be returned from getDevice() if a device is disconnected. Passing NULL into LIBMTP_Get_Storage() results in a NULL pointer dereference. BUG: 405838 TEST PLAN Compiles. I couldn't reproduce this as described in the bug report, but from reading the attached stacktrace in the bug report it's obvious what went wrong here. REPOSITORY R320 KIO Extras BRANCH fixNullPtr (branched from master) REVISION DETAIL https://phabricator.kde.org/D28535 AFFECTED FILES mtp/kiod_module/mtpstorage.cpp To: feverfew, akrutzler, dfaure, elvisangelaccio Cc: kde-frameworks-devel, fvogt, kfm-devel, ngraham, nikolaik, pberestov, iasensio, fprice, LeGast00n, cblack, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, andrebarros, bruns, emmanuelp, mikesomov