Review Request 121786: Fix crash accessing dangling pointer in NotifyByPopup

Martin Klapetek martin.klapetek at gmail.com
Fri Jan 2 00:09:34 UTC 2015


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

Ship it!


Oh good catch...I would have thought it would just cast it to null pointer?


src/notifybypopup.cpp
<https://git.reviewboard.kde.org/r/121786/#comment50745>

    Remove this line


- Martin Klapetek


On Jan. 2, 2015, 12:24 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121786/
> -----------------------------------------------------------
> 
> (Updated Jan. 2, 2015, 12:24 a.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Repository: knotifications
> 
> 
> Description
> -------
> 
> sendNotificationToGalagoServer creates a new QDBusPendingCallWatcher for
> a sent DBus message. It puts a pointer to the KNotification as a property on
> the QObject.
> 
> If the local KNotification object got destroyed whilst that DBus
> operation was happening this meant we would read a dangling pointer.
> 
> By setting the parent of the call watcher to the notification we can
> make sure we don't process the call finishing if the notification no
> longer exists.
> 
> BUG: 340845
> 
> 
> Diffs
> -----
> 
>   src/notifybypopup.cpp 66e593b 
> 
> Diff: https://git.reviewboard.kde.org/r/121786/diff/
> 
> 
> Testing
> -------
> 
> Triggered a notification. It all still worked.
> 
> 
> Thanks,
> 
> David Edmundson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150102/6b2688f0/attachment.html>


More information about the Kde-frameworks-devel mailing list