summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/authfile.c b/authfile.c
index 1c006c43d..4038ab692 100644
--- a/authfile.c
+++ b/authfile.c
@@ -36,7 +36,7 @@
36 */ 36 */
37 37
38#include "includes.h" 38#include "includes.h"
39RCSID("$OpenBSD: authfile.c,v 1.58 2004/08/23 11:48:09 djm Exp $"); 39RCSID("$OpenBSD: authfile.c,v 1.59 2004/12/06 11:41:03 dtucker Exp $");
40 40
41#include <openssl/err.h> 41#include <openssl/err.h>
42#include <openssl/evp.h> 42#include <openssl/evp.h>
@@ -601,13 +601,14 @@ static int
601key_try_load_public(Key *k, const char *filename, char **commentp) 601key_try_load_public(Key *k, const char *filename, char **commentp)
602{ 602{
603 FILE *f; 603 FILE *f;
604 char line[4096]; 604 char line[SSH_MAX_PUBKEY_BYTES];
605 char *cp; 605 char *cp;
606 int linenum = 0;
606 607
607 f = fopen(filename, "r"); 608 f = fopen(filename, "r");
608 if (f != NULL) { 609 if (f != NULL) {
609 while (fgets(line, sizeof(line), f)) { 610 while (read_keyfile_line(f, filename, line, sizeof(line),
610 line[sizeof(line)-1] = '\0'; 611 &linenum) != -1) {
611 cp = line; 612 cp = line;
612 switch (*cp) { 613 switch (*cp) {
613 case '#': 614 case '#':