After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780315 - user-accounts: Prevent a potential crash with an empty user list
user-accounts: Prevent a potential crash with an empty user list
Status: RESOLVED DUPLICATE of bug 773673
Product: gnome-control-center
Classification: Core
Component: User Accounts
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-20 16:09 UTC by Rui Matos
Modified: 2017-03-21 09:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-accounts: Prevent a potential crash with an empty user list (1.28 KB, patch)
2017-03-20 16:09 UTC, Rui Matos
none Details | Review

Description Rui Matos 2017-03-20 16:09:51 UTC
Pointed by coverity. This would only ever be hit if AccountsService
returns 0 users...
Comment 1 Rui Matos 2017-03-20 16:09:56 UTC
Created attachment 348332 [details] [review]
user-accounts: Prevent a potential crash with an empty user list

From a Coverity scan:

panels/user-accounts/um-user-panel.c:1312:20: warning: Access to field
'data' results in a dereference of a null pointer (loaded from
variable 'list')
Comment 2 Rui Matos 2017-03-20 16:11:32 UTC
Forgot to say that this doesn't apply after the recent users panel redesign - it handles this case without crashing already. So this is only for old stable branches <= 3.22
Comment 3 Felipe Borges 2017-03-20 17:45:49 UTC
Isn't it a duplicate of https://bugzilla.gnome.org/show_bug.cgi?id=773673 ?

If so, I would go with your patch, but Ondrej suggested that we would have an empty-state https://bugzilla.gnome.org/show_bug.cgi?id=773673#c11
Comment 4 Ondrej Holy 2017-03-21 09:20:43 UTC
We should push this patch for stable releases and reconsider what to do with master...
Comment 5 Ondrej Holy 2017-03-21 09:22:03 UTC
It would be nice to propose a similar fix for 3.24 also...
Comment 6 Ondrej Holy 2017-03-21 09:22:39 UTC
Let's deal with it on the Bug 773673.

*** This bug has been marked as a duplicate of bug 773673 ***