Bug 321828

Summary: systemtray uninitialized values
Product: [Unmaintained] plasma4 Reporter: Jiri Slaby <jirislaby>
Component: widget-systemtrayAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kde
Priority: NOR    
Version: 4.10.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: fix

Description Jiri Slaby 2013-07-01 13:29:10 UTC
Valgrind says:

==24185== Conditional jump or move depends on uninitialised value(s)
==24185==    at 0x28D57308: SystemTray::WidgetItem::unbind() (widgetitem.cpp:78)
==24185==    by 0x28D575FF: SystemTray::WidgetItem::setTask(QObject*) (widgetitem.cpp:60)
==24185==    by 0x28D403BB: SystemTray::WidgetItem::qt_metacall(QMetaObject::Call, int, void**) (moc_widgetitem.cpp:120)

This is:
    if (m_applet && m_task) {

neither m_applet nor m_task is initialized in the constructor...

Reproducible: Always
Comment 1 Jiri Slaby 2013-07-01 14:36:44 UTC
Created attachment 80882 [details]
fix

only m_applet is undefined...
Comment 2 Kai Uwe Broulik 2013-07-01 20:48:19 UTC
Please put such patches to https://git.reviewboard.kde.org/ for proper review from one of our developers. Otherwise they might get lost. Thanks!
Comment 3 Jiri Slaby 2013-07-02 18:10:41 UTC
(In reply to comment #2)
> Please put such patches to https://git.reviewboard.kde.org/ for proper
> review from one of our developers. Otherwise they might get lost. Thanks!

Ok:
https://git.reviewboard.kde.org/r/111370/
Comment 4 Andreas Hartmetz 2013-07-06 15:48:31 UTC
Git commit 4b50d78d7c429bd50588e8edc10df797e792b9dc by Andreas Hartmetz, on behalf of Jiri Slaby.
Committed on 06/07/2013 at 15:34.
Pushed by ahartmetz into branch 'master'.

system_tray: initialize uninitialized member

A member in WidgetItem is used unitialized. Fix this.

REVIEW: 111370

M  +2    -1    plasma/generic/applets/systemtray/ui/widgetitem.cpp

http://commits.kde.org/kde-workspace/4b50d78d7c429bd50588e8edc10df797e792b9dc