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 762961 - NULL category causes a segfault
NULL category causes a segfault
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-03-01 23:27 UTC by fakey
Modified: 2016-03-02 12:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't perform a lookup when the category is NULL (1.15 KB, patch)
2016-03-01 23:27 UTC, fakey
none Details | Review

Description fakey 2016-03-01 23:27:08 UTC
Created attachment 322815 [details] [review]
don't perform a lookup when the category is NULL

fslint.desktop has this as its Categories entry:

Categories=System;Filesystem;GTK;;Utility;

which causes a problem when get_app_folder () tries to lookup based on the NULL entry.
Comment 1 Richard Hughes 2016-03-02 08:01:43 UTC
Review of attachment 322815 [details] [review]:

+			if (!category) {
+				continue;

I'd rather

if (category == NULL)
	continue;

We tend to compare pointers against NULL explicitly, and drop the braces for single lines. With those changes, please push to master, thanks.
Comment 2 fakey 2016-03-02 12:18:56 UTC
Thanks, corrected and pushed.