Merge lp:~philip.scott/wingpanel-indicator-notifications/prevent-invalid-.desktop-crash into lp:~wingpanel-devs/wingpanel-indicator-notifications/wingpanel-indicator-notifications

Proposed by Felipe Escoto on 2017-02-20
Status: Merged
Approved by: Cody Garver on 2017-02-20
Approved revision: 144
Merged at revision: 144
Proposed branch: lp:~philip.scott/wingpanel-indicator-notifications/prevent-invalid-.desktop-crash
Merge into: lp:~wingpanel-devs/wingpanel-indicator-notifications/wingpanel-indicator-notifications
Diff against target: 14 lines (+2/-2)
1 file modified
src/Utils.vala (+2/-2)
To merge this branch: bzr merge lp:~philip.scott/wingpanel-indicator-notifications/prevent-invalid-.desktop-crash
Reviewer Review Type Date Requested Status
WingPanel Devs 2017-02-20 Pending
Review via email: mp+317735@code.launchpad.net

Commit message

Check array-length before accessing it to prevent crashing if .desktop file has an empty exec line

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Utils.vala'
2--- src/Utils.vala 2016-07-16 22:13:01 +0000
3+++ src/Utils.vala 2017-02-20 01:42:16 +0000
4@@ -70,7 +70,7 @@
5
6 return (app_name.down () == token
7 || token_executable == app_executable
8- || args[0] == token
9+ || (args.length > 0 && args[0] == token)
10 || app_display_name.down ().contains (token));
11 }
12-}
13\ No newline at end of file
14+}

Subscribers

People subscribed via source and target branches