Review Request 114562: Fix crash when dragging a file from an expanded folder (regression in master)

Commit Hook null at kde.org
Sun Dec 22 12:19:51 GMT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114562/#review46036
-----------------------------------------------------------


This review has been submitted with commit 5e13b762f432cbe043a6d6d6e4ebe33ff55a65fb by Frank Reininghaus to branch master.

- Commit Hook


On Dec. 20, 2013, 10:07 a.m., Frank Reininghaus wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114562/
> -----------------------------------------------------------
> 
> (Updated Dec. 20, 2013, 10:07 a.m.)
> 
> 
> Review request for Dolphin.
> 
> 
> Repository: kde-baseapps
> 
> 
> Description
> -------
> 
> I just found out that there is a problem with https://git.reviewboard.kde.org/r/113515/ : The while-loop that is supposed to iterate through the parents of an item in order to find out if one of them is part of the QMimeData already (because it's not necessary to add the child item in that case) does not really iterate through the parents, but replaces itemData by its parent repeatedly, until itemData eventually becomes 0, and we get a segfault.
> 
> To reproduce, expand a folder, select an item inside the folder, but not the folder itself, and drag or copy the selected file.
> 
> Replacing "itemData = itemData->parent;" by "parent = parent->parent;" fixes the problem.
> 
> If noone sees a problem with this patch, I'll push it very soon to prevent that more people find out about this bug the hard way. I'll push the new unit test also to KDE/4.12 (I should really have written some tests for createMimeData() before changing that function).
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kfileitemmodel.cpp 4521374 
>   dolphin/src/tests/CMakeLists.txt 9b152ed 
>   dolphin/src/tests/kfileitemmodeltest.cpp 62ff4fa 
> 
> Diff: https://git.reviewboard.kde.org/r/114562/diff/
> 
> 
> Testing
> -------
> 
> Fixes the crash. Old and new unit tests pass.
> 
> 
> Thanks,
> 
> Frank Reininghaus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20131222/d2a5b4f3/attachment.htm>


More information about the kfm-devel mailing list