Merge lp://qastaging/~mhr3/unity/fix-861144 into lp://qastaging/unity
Proposed by
Michal Hruby
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1748 |
Proposed branch: | lp://qastaging/~mhr3/unity/fix-861144 |
Merge into: | lp://qastaging/unity |
Diff against target: |
193 lines (+78/-31) 3 files modified
services/panel-indicator-entry-accessible.c (+1/-3) services/panel-root-accessible.c (+35/-6) services/panel-service.c (+42/-22) |
To merge this branch: | bzr merge lp://qastaging/~mhr3/unity/fix-861144 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Penhey (community) | Approve | ||
Marco Trevisan (Treviño) | Approve | ||
Review via email: mp+81957@code.qastaging.launchpad.net |
Description of the change
The changes in this branch try to make the panel-service more crash-proof by disallowing casts of random pointers to IndicatorObject
Please note that this should go also into unity/4.0 branch.
To post a comment you must log in.
+ { Entry */ table_lookup (priv-> entry2indicator _hash, entry) != NULL)
+ /* check that there really is such IndicatorObject
+ if (g_hash_
+ {
+ return entry;
+ }
Can you add an extra check in there:
+ if (!INDICATOR_ IS_OBJECT_ ENTRY (entry)) Entry reference %p", entry);
+ {
+ g_critical ("Invalid IndicatorObject
+ return NULL;
+ }
Not that it makes the code much more safe, but it has a slim chance of
making debugging easier should we ever see it again