diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-20 07:31:10 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-20 07:31:10 +0000 |
commit | 73732ffa0585faacb53b6f7bb9f741c54251dd6d (patch) | |
tree | e14590b3d00f0f24aa3f9ddb174cc6fff1ec5317 /cmd-command-prompt.c | |
parent | ff2cc0e38709b285293fd38ab720f4eb785ce361 (diff) |
Kill some dead stores and fix a null pointer deref, found by clang.
Diffstat (limited to 'cmd-command-prompt.c')
-rw-r--r-- | cmd-command-prompt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index 196376b1..872fa326 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -140,6 +140,8 @@ cmd_command_prompt_callback(void *data, const char *s) } } + if (buf == NULL) + return (0); buf[len] = '\0'; s = buf; } |