comparison svr-authpubkey.c @ 853:b11cb2518116 ecc

Don't exit fatally if authorized_keys has a line like command="something" ssh-rsa
author Matt Johnston <matt@ucc.asn.au>
date Tue, 12 Nov 2013 23:58:51 +0800
parents 7540c0822374
children 703c7cdd2577
comparison
equal deleted inserted replaced
852:7540c0822374 853:b11cb2518116
292 options_len++; 292 options_len++;
293 } 293 }
294 options_buf = buf_new(options_len); 294 options_buf = buf_new(options_len);
295 buf_putbytes(options_buf, options_start, options_len); 295 buf_putbytes(options_buf, options_start, options_len);
296 296
297 /* compare the algorithm */ 297 /* compare the algorithm. +3 so we have enough bytes to read a space and some base64 characters too. */
298 if (line->pos + algolen > line->len) { 298 if (line->pos + algolen+3 > line->len) {
299 continue; 299 continue;
300 } 300 }
301 if (strncmp(buf_getptr(line, algolen), algo, algolen) != 0) { 301 if (strncmp(buf_getptr(line, algolen), algo, algolen) != 0) {
302 continue; 302 continue;
303 } 303 }