[XFCE 0000012]: xfce4-panel crashes on commands with empty 'Command' field

xfce-bugs at xfce.org xfce-bugs at xfce.org
Tue Dec 23 14:09:39 CET 2003


The following bug has been CLOSED
=======================================================================
http://bugs.xfce.org/view_bug_page.php?f_id=0000012
=======================================================================
Reporter:                   jimmy
Handler:                    huysmans
=======================================================================
Project:                    XFCE
Bug ID:                     0000012
Category:                   panel
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     closed
=======================================================================
Date Submitted:             2003-11-17 12:45 GMT
Last Modified:              2003-12-23 13:09 GMT
=======================================================================
Summary:                    xfce4-panel crashes on commands with empty 'Command' field
Description: 
When running an application from the panel, no check is
made if it's "Command" field is empty. So when it is, any
attempt to run the command ends with signal11 due to the
command->cmd field being NULL, and the panel is restarted.

=======================================================================

-----------------------------------------------------------------------
 Zephaniah - 2003-11-17 14:45 GMT 
-----------------------------------------------------------------------
Seems like this is fixed 4.0.1. I make a launcher with an empty 'Command'
field, click it, and nothing happens (no panel crash).

-----------------------------------------------------------------------
 huysmans - 2003-11-17 15:07 GMT 
-----------------------------------------------------------------------
Hmm, I am quite sure that check used to be there ...

Anyway, it doesn't crash for me either, but it is definitely a bug. 

I'm about to commit the following patch to CVS (yours was fine as well,
this one will complain a bit more ;-)

Thanks, 
Jasper


Index: xfce_support.c
===================================================================
RCS file: /var/cvs/xfce/xfce4/xfce4/panel/xfce_support.c,v
retrieving revision 1.47
diff -u -r1.47 xfce_support.c
--- xfce_support.c      7 Aug 2003 19:05:04 -0000       1.47
+++ xfce_support.c      17 Nov 2003 15:05:09 -0000
@@ -982,6 +982,7 @@
 void
 exec_cmd (const char *cmd, gboolean in_terminal, gboolean use_sn)
 {
+    g_return_if_fail (cmd != NULL);
     schedule_exec(cmd, in_terminal, use_sn, FALSE);
 }
 
@@ -989,5 +990,6 @@
 void
 exec_cmd_silent (const char *cmd, gboolean in_terminal, gboolean use_sn)
 {
+    g_return_if_fail (cmd != NULL);
     schedule_exec(cmd, in_terminal, use_sn, TRUE);
 }

-----------------------------------------------------------------------
 huysmans - 2003-11-17 15:36 GMT 
-----------------------------------------------------------------------
Setting status to resolved. I will close the bug when a version containing
the fix is released.

-----------------------------------------------------------------------
 huysmans - 2003-12-23 13:09 GMT 
-----------------------------------------------------------------------
fixed in 4.0.2



More information about the Xfce-dev mailing list