diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-03-29 18:47:27 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2014-03-29 18:47:27 +0100 |
commit | 33b8758fb0118f9bf20375734935adc1bf7c33fb (patch) | |
tree | 442da09bb49cdab1ca25311954f9cce5b596dae1 /src | |
parent | bde541308ee998fd3185500b4362bb404f51ee4c (diff) | |
download | ratpoison-33b8758fb0118f9bf20375734935adc1bf7c33fb.zip |
In read_shellcmd make sure we don't dereference a NULL pointer.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions.c | 2 |
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; |