1
0
mirror of https://github.com/clearml/dropbear synced 2025-04-27 17:31:16 +00:00

Don't exit fatally if authorized_keys has a line like

command="something" ssh-rsa

--HG--
branch : ecc
This commit is contained in:
Matt Johnston 2013-11-12 23:58:51 +08:00
parent e60a84d0ed
commit b77864931b

View File

@ -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) {