Bug 405838 - KIOD5 crashes if user disconnects MTP device during copeing
Summary: KIOD5 crashes if user disconnects MTP device during copeing
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: MTP (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
: 412159 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-03-24 21:32 UTC by Mike Krutov
Modified: 2022-01-06 12:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
crash log (6.84 KB, text/plain)
2019-03-24 21:32 UTC, Mike Krutov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Krutov 2019-03-24 21:32:56 UTC
Created attachment 119010 [details]
crash log

SUMMARY


STEPS TO REPRODUCE
1. Start copying data to MTP device 
2. During copy operation, disconnect device
3. Bam

OBSERVED RESULT
Crash

EXPECTED RESULT
No crash

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.15.3
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.0

ADDITIONAL INFORMATION
Comment 1 a.saoutkin 2020-04-13 12:08:56 UTC
Git commit 94e7b64325f9e71196a19fb5bc396b9e82f88fc7 by Alexander Saoutkin.
Committed on 13/04/2020 at 12:11.
Pushed by asaoutkin into branch 'master'.

[KIO-MTP] Fix null pointer dereference

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.

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.

Reviewers: akrutzler, dfaure, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: anthonyfieroni, kde-frameworks-devel, fvogt, kfm-devel, ngraham

Tags: #dolphin, #frameworks

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

M  +0    -6    mtp/kiod_module/mtpdevice.cpp

https://commits.kde.org/kio-extras/94e7b64325f9e71196a19fb5bc396b9e82f88fc7
Comment 2 Harald Sitter 2022-01-06 12:59:01 UTC
*** Bug 412159 has been marked as a duplicate of this bug. ***