Merge lp:~unity-team/unity/unity.fix-752293 into lp:unity

Proposed by Mirco Müller
Status: Merged
Merged at revision: 1090
Proposed branch: lp:~unity-team/unity/unity.fix-752293
Merge into: lp:unity
Diff against target: 69 lines (+23/-12)
3 files modified
src/IndicatorObjectEntryProxyRemote.cpp (+4/-0)
src/IndicatorObjectFactoryRemote.cpp (+15/-12)
src/IndicatorObjectProxyRemote.cpp (+4/-0)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-752293
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+56890@code.launchpad.net

Description of the change

potential fix for LP: #752293

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Looks good! approved :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/IndicatorObjectEntryProxyRemote.cpp'
2--- src/IndicatorObjectEntryProxyRemote.cpp 2011-03-17 09:41:28 +0000
3+++ src/IndicatorObjectEntryProxyRemote.cpp 2011-04-08 07:55:41 +0000
4@@ -126,6 +126,10 @@
5 bool __image_sensitive,
6 bool __image_visible)
7 {
8+ // sanity check
9+ if (!__id || !__label || !__image_data)
10+ return;
11+
12 g_free (_id);
13 g_free (_label);
14 g_free (_image_data);
15
16=== modified file 'src/IndicatorObjectFactoryRemote.cpp'
17--- src/IndicatorObjectFactoryRemote.cpp 2011-04-06 12:34:53 +0000
18+++ src/IndicatorObjectFactoryRemote.cpp 2011-04-08 07:55:41 +0000
19@@ -329,21 +329,24 @@
20
21 void
22 IndicatorObjectFactoryRemote::Sync (GVariant *args)
23-{
24- GVariantIter *iter;
25- gchar *indicator_id;
26- gchar *entry_id;
27- gchar *label;
28- gboolean label_sensitive;
29- gboolean label_visible;
30- guint32 image_type;
31- gchar *image_data;
32- gboolean image_sensitive;
33- gboolean image_visible;
34-
35+{
36+ GVariantIter *iter = NULL;
37+ gchar *indicator_id = NULL;
38+ gchar *entry_id = NULL;
39+ gchar *label = NULL;
40+ gboolean label_sensitive = false;
41+ gboolean label_visible = false;
42+ guint32 image_type = 0;
43+ gchar *image_data = NULL;
44+ gboolean image_sensitive = false;
45+ gboolean image_visible = false;
46 IndicatorObjectProxyRemote *current_proxy = NULL;
47 gchar *current_proxy_id = NULL;
48
49+ // sanity check
50+ if (!args)
51+ return;
52+
53 g_variant_get (args, "(a(sssbbusbb))", &iter);
54 while (g_variant_iter_loop (iter, "(sssbbusbb)",
55 &indicator_id,
56
57=== modified file 'src/IndicatorObjectProxyRemote.cpp'
58--- src/IndicatorObjectProxyRemote.cpp 2011-03-17 09:41:28 +0000
59+++ src/IndicatorObjectProxyRemote.cpp 2011-04-08 07:55:41 +0000
60@@ -74,6 +74,10 @@
61 bool image_sensitive,
62 bool image_visible)
63 {
64+ // sanity check
65+ if (!entry_id || !label || !image_data)
66+ return;
67+
68 IndicatorObjectEntryProxyRemote *remote = NULL;
69 std::vector<IndicatorObjectEntryProxy*>::iterator it;
70