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 764921 - segfault when unable to find a cached icon
segfault when unable to find a cached icon
Status: RESOLVED FIXED
Product: gnome-software
Classification: Applications
Component: General
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Software maintainer(s)
GNOME Software maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-04-11 21:51 UTC by Mike Gorse
Modified: 2016-05-28 20:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. (886 bytes, patch)
2016-04-11 21:55 UTC, Mike Gorse
none Details | Review

Description Mike Gorse 2016-04-11 21:51:57 UTC
In gs-appstream.c, we have this code:
		if (icon == NULL) {
			g_warning ("failed to find cached icon %s",
				   as_icon_get_name (icon));
			return;
		}

 this code gets executed, then we call as_icon_get_name (NULL), leading to a crash.

Downstream bug -> https://bugzilla.opensuse.org/show_bug.cgi?id=974806
Comment 1 Mike Gorse 2016-04-11 21:55:28 UTC
Created attachment 325753 [details] [review]
Proposed patch.
Comment 2 Richard Hughes 2016-04-27 18:52:32 UTC
commit 33e099bd18a51b50348d5ed38b2a620eb159b669
Author: Richard Hughes <richard@hughsie.com>
Date:   Wed Apr 27 19:52:04 2016 +0100

    Fix potential crash when icons are missing
    
    Resolves: https://bugzilla.gnome.org/show_bug.cgi?id=764921
Comment 3 Bjørn Lie 2016-05-28 20:01:48 UTC
Thanks a bunch for the fix.

Is there any chance we could have this cherry-picked into 3.20 stable branch too?