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 663601 - Possibly passing NULL to g_str_has_prefix() in default_log_handler()
Possibly passing NULL to g_str_has_prefix() in default_log_handler()
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.2.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 694353 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-11-08 07:43 UTC by Gou LF
Modified: 2013-02-22 10:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main: Guard against NULL log_domain in default handler (994 bytes, patch)
2013-02-21 12:49 UTC, Florian Müllner
committed Details | Review

Description Gou LF 2011-11-08 07:43:32 UTC
In src/main.c, a log message handler is registered. When called, the argument log_domain could be NULL (which is G_LOG_DOMAIN). And the if statement inside just assume it to be non-NULL. Thus assertion fails.
Comment 1 Florian Müllner 2013-02-21 12:49:11 UTC
Created attachment 237033 [details] [review]
main: Guard against NULL log_domain in default handler

g_str_has_prefix() will assert when passed NULL, so we need to make
sure that we are passed a non-NULL log_domain first.

Spotted by <goughost<at>yahoo.com.cn>
Comment 2 Florian Müllner 2013-02-21 12:49:33 UTC
*** Bug 694353 has been marked as a duplicate of this bug. ***
Comment 3 drago01 2013-02-22 09:14:55 UTC
Review of attachment 237033 [details] [review]:

OK.
Comment 4 Florian Müllner 2013-02-22 10:02:24 UTC
Attachment 237033 [details] pushed as acffd1e - main: Guard against NULL log_domain in default handler