diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-01-28 21:31:20 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-01-28 21:31:20 +0200 |
commit | fbecfc3c8ffe9390478fb48a8a7413b538034252 (patch) | |
tree | 785aa79199348fce6c8a988df1f5567ca8794bb0 /contrib | |
parent | Merge pull request #5064 (diff) | |
parent | readline: don't dereference possible NULL pointer (diff) | |
download | monero-fbecfc3c8ffe9390478fb48a8a7413b538034252.tar.xz |
Merge pull request #5065
ca86ef1b readline: don't dereference possible NULL pointer (Jethro Grassie)
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/src/readline_buffer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/epee/src/readline_buffer.cpp b/contrib/epee/src/readline_buffer.cpp index c5949da0a..39369c43f 100644 --- a/contrib/epee/src/readline_buffer.cpp +++ b/contrib/epee/src/readline_buffer.cpp @@ -114,7 +114,7 @@ int rdln::readline_buffer::sync() int end = 0, point = 0; #endif - if (rl_end || *rl_prompt) + if (rl_end || (rl_prompt && *rl_prompt)) { #if RL_READLINE_VERSION >= 0x0700 rl_clear_visible_line(); @@ -137,7 +137,7 @@ int rdln::readline_buffer::sync() while ( this->snextc() != EOF ); #if RL_READLINE_VERSION < 0x0700 - if (end || *rl_prompt) + if (end || (rl_prompt && *rl_prompt)) { rl_restore_prompt(); rl_line_buffer = line; |