Index: ChangeLog =================================================================== RCS file: /sources/ratpoison/ratpoison/ChangeLog,v retrieving revision 1.460 diff -u -p -r1.460 ChangeLog --- ChangeLog 23 Nov 2006 15:14:37 -0000 1.460 +++ ChangeLog 25 Nov 2006 15:35:39 -0000 @@ -1,1 +1,9 @@ +2006-11-25 Bernhard R. Link + * src/events.c (execute_remote_command): do not return NULL + to avoid segfault on remote command request without command. + + * src/actions.c (cmdret_new): make non-static + + * src/actions.h (cmdret_new): add prototype + 2006-11-23 Bernhard R. Link Index: src/actions.c =================================================================== RCS file: /sources/ratpoison/ratpoison/src/actions.c,v retrieving revision 1.282 diff -u -p -r1.282 actions.c --- src/actions.c 17 Nov 2006 11:48:01 -0000 1.282 +++ src/actions.c 25 Nov 2006 15:35:39 -0000 @@ -762,7 +762,7 @@ initialize_default_keybindings (void) add_alias ("split", "vsplit"); } -static cmdret * +cmdret * cmdret_new (int success, char *fmt, ...) { cmdret *ret = xmalloc (sizeof (cmdret)); Index: src/actions.h =================================================================== RCS file: /sources/ratpoison/ratpoison/src/actions.h,v retrieving revision 1.90 diff -u -p -r1.90 actions.h --- src/actions.h 27 Sep 2006 01:00:45 -0000 1.90 +++ src/actions.h 25 Nov 2006 15:35:39 -0000 @@ -220,6 +220,7 @@ rp_keymap *find_keymap (char *name); void init_user_commands(void); void initialize_default_keybindings (void); void cmdret_free (cmdret *ret); +cmdret *cmdret_new (int success, char *fmt, ...); void keymap_free (rp_keymap *map); void free_aliases (void); void free_keymaps (void); Index: src/events.c =================================================================== RCS file: /sources/ratpoison/ratpoison/src/events.c,v retrieving revision 1.137 diff -u -p -r1.137 events.c --- src/events.c 4 Oct 2006 03:02:50 -0000 1.137 +++ src/events.c 25 Nov 2006 15:35:40 -0000 @@ -477,7 +477,7 @@ execute_remote_command (Window w) if (status != Success || req == NULL) { PRINT_DEBUG (("Couldn't get RP_COMMAND Property\n")); - return NULL; + return cmdret_new (RET_FAILURE, NULL); } /* XGetWindowProperty always allocates one extra byte even if @@ -492,7 +492,7 @@ execute_remote_command (Window w) if (status != Success || req == NULL) { PRINT_DEBUG (("Couldn't get RP_COMMAND Property\n")); - return NULL; + return cmdret_new (RET_FAILURE, NULL); } PRINT_DEBUG (("command: %s\n", req));