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 749896 - Possible NULL dereference
Possible NULL dereference
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Printers
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: Marek Kašík
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-05-26 11:30 UTC by Bastien Nocera
Modified: 2015-07-13 09:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Check whether we have a device name (879 bytes, patch)
2015-05-26 14:49 UTC, Marek Kašík
committed Details | Review

Description Bastien Nocera 2015-05-26 11:30:02 UTC
gnome-control-center-3.14.5/panels/printers/pp-utils.c:4234:37: warning: Array access (from variable 'name') results in a null pointer dereference
#           name[strlen (lower_name)] = '\0';
#           ~~~~                      ^
#  4232|           {
#  4233|             occurrence[0] = '\0';
#  4234|->           name[strlen (lower_name)] = '\0';
#  4235|           }
#  4236|
Comment 1 Marek Kašík 2015-05-26 14:49:33 UTC
Created attachment 304019 [details] [review]
Check whether we have a device name

Attached patch fixes the problem for me.
Comment 2 Bastien Nocera 2015-07-10 14:03:13 UTC
Review of attachment 304019 [details] [review]:

Sure.
Comment 3 Marek Kašík 2015-07-13 09:27:33 UTC
Comment on attachment 304019 [details] [review]
Check whether we have a device name

Thank you for the review, I've pushed the patch into master, 3.16 and 3.14.