summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-03-29 18:47:27 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2014-03-29 18:47:27 +0100
commit33b8758fb0118f9bf20375734935adc1bf7c33fb (patch)
tree442da09bb49cdab1ca25311954f9cce5b596dae1
parentbde541308ee998fd3185500b4362bb404f51ee4c (diff)
downloadratpoison-33b8758fb0118f9bf20375734935adc1bf7c33fb.zip
In read_shellcmd make sure we don't dereference a NULL pointer.
-rw-r--r--src/actions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c
index e08dc58..6dfe56f 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1758,7 +1758,7 @@ read_shellcmd (struct argspec *spec, struct sbuf *s, struct cmdarg **arg, const
cmdret *ret;
ret = read_string (spec, s, hist_SHELLCMD, exec_completions, arg);
- if (command_name && !s && !ret) {
+ if (command_name && !s && !ret && (*arg)->string) {
/* store for command history */
struct sbuf *buf;