diff options
author | Matt Johnston <matt@ucc.asn.au> | 2018-03-07 22:14:36 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2018-03-07 22:14:36 +0800 |
commit | ed4c38ba467618a7193f4e5dec1d5f0169e0c227 (patch) | |
tree | 7b9801451ec8b16fe58012af5976eda76755a383 /svr-authpubkeyoptions.c | |
parent | e9edbe8bb204b00c7f4b4fda7eeee9d0177934ae (diff) |
fix leak in option handling
Diffstat (limited to 'svr-authpubkeyoptions.c')
-rw-r--r-- | svr-authpubkeyoptions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/svr-authpubkeyoptions.c b/svr-authpubkeyoptions.c index 9498b64..ba6f698 100644 --- a/svr-authpubkeyoptions.c +++ b/svr-authpubkeyoptions.c @@ -168,6 +168,12 @@ int svr_add_pubkey_options(buffer *options_buf, int line_num, const char* filena if (match_option(options_buf, "command=\"") == DROPBEAR_SUCCESS) { int escaped = 0; const unsigned char* command_start = buf_getptr(options_buf, 0); + + if (ses.authstate.pubkey_options->forced_command) { + /* multiple command= options */ + goto bad_option; + } + while (options_buf->pos < options_buf->len) { const char c = buf_getbyte(options_buf); if (!escaped && c == '"') { |