Summary: | Dolphin crashes when pointing Trash to /dev/null | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | Thomas Faber <kde> |
Component: | panels: places | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | groot, kfm-devel, nate |
Priority: | VLO | Keywords: | drkonqi |
Version: | 21.04.2 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/frameworks/kio/commit/9f6f1c5506b714e049977a4868723b2b2529aed4 | Version Fixed In: |
Description
Thomas Faber
2021-07-08 01:57:10 UTC
Aside from "don't do that then" (/dev/null is not a directory and you can't move files to "inside" it, just like you couldn't use /dev/ttyS0 to send trashed-files to a serial-port-attached-paper-shredder), this shouldn't crash dolphin. Confirmed on X11/FreeBSD (Frameworks 5.82) Yeah this definitely seems like a "Don't do that" situation. :) But indeed, it should not crash if you do. A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/544 Git commit 9f6f1c5506b714e049977a4868723b2b2529aed4 by Jan Paul Batrina. Committed on 29/08/2021 at 04:22. Pushed by ahmadsamir into branch 'master'. KFilePlaceEditDialog: Always preserve previous icon When the original item's url is trash:/, m_iconButton wasn't instantiated since isIconEditable() will return false. If the url is edited to point somewhere else, isIconEditable() will return false, making the check in KFilePlaceEditDialog::icon() fail to guard access to m_iconButton which points to nullptr. This crash can be seen by trying to change the "Trash" entry's location in Dolphin's Places panel. This patch makes it so that m_iconButton is always instantiated to prevent the crash and also to always preserve the original icon before editing. M +16 -17 src/filewidgets/kfileplaceeditdialog.cpp https://invent.kde.org/frameworks/kio/commit/9f6f1c5506b714e049977a4868723b2b2529aed4 |