# HG changeset patch # User Matt Johnston # Date 1384271931 -28800 # Node ID b11cb2518116314cbb98e1955ae39901e7d51a76 # Parent 7540c08223740c07a118c225ab72540af696488e Don't exit fatally if authorized_keys has a line like command="something" ssh-rsa diff -r 7540c0822374 -r b11cb2518116 svr-authpubkey.c --- a/svr-authpubkey.c Tue Nov 12 23:02:32 2013 +0800 +++ b/svr-authpubkey.c Tue Nov 12 23:58:51 2013 +0800 @@ -294,8 +294,8 @@ 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) {