GNOME Bugzilla – Bug 788716
Segfault in load_wifi_devices()
Last modified: 2017-11-02 09:46:13 UTC
The bug has been reported against 3.26.1-0ubuntu1 on https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1722186
+ Trace 238036
the corresponding code is " devices = nm_client_get_devices (self->client); /* Cold-plug existing devices */ for (i = 0; i < devices->len; i++)" nm_client_get_devices can return NULL though, other panels do check for that which this one doesn't before trying to access ->len
Created attachment 361187 [details] [review] don't segfault when there is no device listed
Review of attachment 361187 [details] [review]: sigh, I don't think this was a problem in the past so I think NM changed here and the documentation doesn't say this might return NULL, in fact, it says it returns an array that's owned by the library so there's no reason for it to be NULL but whatever better safe than sorrow ::: panels/network/cc-wifi-panel.c @@ +143,3 @@ + if (devices == NULL) + return; + we still need to call check_main_stack_page() below
Created attachment 362764 [details] [review] network: Avoid crashing if NM reports no devices or no connections Seems like NM changed behavior recently but, in any case, better safe than sorry.
Attachment 362764 [details] pushed as cb4a7e1 - network: Avoid crashing if NM reports no devices or no connections
*** Bug 789030 has been marked as a duplicate of this bug. ***