Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 339302 - xfce4-stopwatch-plugin-0.2.0 segfault due to non-existant rc-config-file
Summary: xfce4-stopwatch-plugin-0.2.0 segfault due to non-existant rc-config-file
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: XFCE Team
URL: http://bugzilla.xfce.org/show_bug.cgi...
Whiteboard:
Keywords:
Depends on:
Blocks: 349053
  Show dependency tree
 
Reported: 2010-10-01 03:29 UTC by Franz Brauße
Modified: 2011-01-11 10:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Brauße 2010-10-01 03:29:18 UTC
The xfce4-stopwatch-plugin-0.2.0 crashes due to a segmentation fault using the ebuild installation. The crash of the plugin also kills the xfce4-panel process it's been loaded into. It occurs due to not checking the return value of xfce_panel_plugin_lookup_rc_file() for NULL in the function stopwatch_plugin_load() which is called during startup of the plugin.

Reproducible: Always

Steps to Reproduce:
1. Install xfce4-stopwatch-plugin (USE-flag "debug" doesn't change anything)
2. Load it into a started xfce4-panel
3. See the panel crash



The below patch eliminates the problem (and partly ungarbles the source):

diff -urw a/panel-plugin/stopwatch.c b/panel-plugin/stopwatch.c
--- a/panel-plugin/stopwatch.c	2009-07-28 00:47:25.000000000 +0200
+++ b/panel-plugin/stopwatch.c	2010-10-01 05:23:34.611694903 +0200
@@ -582,7 +582,11 @@
 	g_return_if_fail (panel_plugin != NULL);
 	_tmp0_ = NULL;
 	_tmp1_ = NULL;
-	rc = (_tmp1_ = xfce_rc_simple_open (_tmp0_ = xfce_panel_plugin_lookup_rc_file (panel_plugin), TRUE), _tmp0_ = (g_free (_tmp0_), NULL), _tmp1_);
+	_tmp0_ = xfce_panel_plugin_lookup_rc_file (panel_plugin);
+	if (!_tmp0_)
+		return;
+	rc = xfce_rc_simple_open (_tmp0_, TRUE);
+	g_free (_tmp0_);
 	elapsed = (my_time_val_init_zero (&_tmp2_), _tmp2_);
 	sscanf (xfce_rc_read_entry (rc, "elapsed_sec", "0"), "%ld", &elapsed.tv_sec);
 	sscanf (xfce_rc_read_entry (rc, "elapsed_usec", "0"), "%ld", &elapsed.tv_usec);
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-10-01 03:35:16 UTC
Please report it to http://bugs.xfce.org/ too for upstream inclusion. And add the link to the bug here. Thanks!
Comment 2 Franz Brauße 2010-10-01 05:30:34 UTC
[x] done
http://bugzilla.xfce.org/show_bug.cgi?id=6717
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-01-11 10:16:55 UTC
This plug-in was removed from tree because of bug 344653 -> Closing as WONTFIX