Merge lp:~ted/indicator-messages/verify-before-parse into lp:indicator-messages/15.04

Proposed by Ted Gould on 2015-02-17
Status: Merged
Approved by: Charles Kerr on 2015-03-02
Approved revision: 428
Merged at revision: 443
Proposed branch: lp:~ted/indicator-messages/verify-before-parse
Merge into: lp:indicator-messages/15.04
Diff against target: 11 lines (+2/-0)
1 file modified
src/im-application-list.c (+2/-0)
To merge this branch: bzr merge lp:~ted/indicator-messages/verify-before-parse
Reviewer Review Type Date Requested Status
Charles Kerr (community) 2015-02-17 Approve on 2015-03-02
PS Jenkins bot (community) continuous-integration Approve on 2015-03-02
Review via email: mp+250062@code.launchpad.net

Commit message

Verify state type before parsing

Description of the change

Never use g_variant_get(), please.

To post a comment you must log in.
Charles Kerr (charlesk) wrote :

The Jenkins failure looks like a hiccup, so re-queueing.

The patch looks fine, but is there a bug # associated with this patch?

Ted Gould (ted) wrote :

No, it was when looking at another bug I thought this was the fix. It wasn't, but I figured we should fix it anyway.

Charles Kerr (charlesk) wrote :

And Jenkins is happy now too

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/im-application-list.c'
2--- src/im-application-list.c 2015-01-26 19:04:11 +0000
3+++ src/im-application-list.c 2015-02-17 20:08:22 +0000
4@@ -293,6 +293,8 @@
5 state = g_action_group_get_action_state (G_ACTION_GROUP(app->source_actions), action_name);
6 if (state == NULL)
7 return FALSE;
8+ if (!g_variant_is_of_type(state, G_VARIANT_TYPE("(uxsb)")))
9+ return FALSE;
10
11 g_variant_get (state, "(ux&sb)", &count, &time, &string, &draws_attention);
12

Subscribers

People subscribed via source and target branches