Merge lp:~larsu/unity/lp1495173 into lp:unity
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andrea Azzarone | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 4012 | ||||
Proposed branch: | lp:~larsu/unity/lp1495173 | ||||
Merge into: | lp:unity | ||||
Diff against target: |
11 lines (+1/-1) 1 file modified
launcher/DevicesSettingsImp.cpp (+1/-1) |
||||
To merge this branch: | bzr merge lp:~larsu/unity/lp1495173 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Andrea Azzarone (community) | Approve | ||
Review via email: mp+271446@code.launchpad.net |
Commit message
DevicesSettingsImp: dont't feed garbage to gsettings
Use a const reference for the iteration variable in the loop over _blacklist so that the pointers returned from c_str() are still valid when feeding them to g_settings_
In the best case, this only wrote garbage to the "blacklist" key (making that setting useless). In the worst case, it led to a crash because the garbage was invalid utf8, which gsettings refuses to accept.
Fixes LP: #1495173
Description of the change
DevicesSettingsImp: dont't feed garbage to gsettings
Use a const reference for the iteration variable in the loop over _blacklist so that the pointers returned from c_str() are still valid when feeding them to g_settings_
In the best case, this only wrote garbage to the "blacklist" key (making that setting useless). In the worst case, it led to a crash because the garbage was invalid utf8, which gsettings refuses to accept.
Fixes LP: #1495173
LGTM.