diff options
author | Matt Johnston <matt@ucc.asn.au> | 2013-11-12 23:58:51 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2013-11-12 23:58:51 +0800 |
commit | b77864931bb577691c4bf59df3cfe4e5ba306bd0 (patch) | |
tree | 89363b5cdacf796c1ac7976086d567ad0ce64b33 /svr-authpubkey.c | |
parent | e60a84d0ed81365a4ac24f06d574b7accb6ab2bd (diff) | |
download | dropbear-b77864931bb577691c4bf59df3cfe4e5ba306bd0.tar.gz |
Don't exit fatally if authorized_keys has a line like
command="something" ssh-rsa
--HG--
branch : ecc
Diffstat (limited to 'svr-authpubkey.c')
-rw-r--r-- | svr-authpubkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svr-authpubkey.c b/svr-authpubkey.c index 4eca211..66fe5e5 100644 --- a/svr-authpubkey.c +++ b/svr-authpubkey.c @@ -294,8 +294,8 @@ static int checkpubkey(unsigned char* algo, unsigned int algolen, options_buf = buf_new(options_len); buf_putbytes(options_buf, options_start, options_len); - /* compare the algorithm */ - if (line->pos + algolen > line->len) { + /* compare the algorithm. +3 so we have enough bytes to read a space and some base64 characters too. */ + if (line->pos + algolen+3 > line->len) { continue; } if (strncmp(buf_getptr(line, algolen), algo, algolen) != 0) { |