View | Details | Raw Unified | Return to bug 884 | Differences between
and this patch

Collapse All | Expand All

(-)auth2-pubkey.c (-1 / +1 lines)
Lines 163-169 done: Link Here
163
static int
163
static int
164
user_key_allowed2(struct passwd *pw, Key *key, char *file)
164
user_key_allowed2(struct passwd *pw, Key *key, char *file)
165
{
165
{
166
	char line[8192];
166
	char line[16384];
167
	int found_key = 0;
167
	int found_key = 0;
168
	FILE *f;
168
	FILE *f;
169
	u_long linenum = 0;
169
	u_long linenum = 0;
(-)authfile.c (-1 / +11 lines)
Lines 595-606 static int Link Here
595
key_try_load_public(Key *k, const char *filename, char **commentp)
595
key_try_load_public(Key *k, const char *filename, char **commentp)
596
{
596
{
597
	FILE *f;
597
	FILE *f;
598
	char line[4096];
598
	char line[16384];
599
	char *cp;
599
	char *cp;
600
	int c, lineno = 0;
600
601
601
	f = fopen(filename, "r");
602
	f = fopen(filename, "r");
602
	if (f != NULL) {
603
	if (f != NULL) {
603
		while (fgets(line, sizeof(line), f)) {
604
		while (fgets(line, sizeof(line), f)) {
605
			lineno++;
606
			if (line[strlen(line) - 1] != '\n') {
607
				error("Excessively long line in %s line %d",
608
				    filename, lineno);
609
				/* discard remainder of line */
610
				while ((c = fgetc(f) != EOF) && c != '\n')
611
					;	/* nothing */
612
				break;
613
			}
604
			line[sizeof(line)-1] = '\0';
614
			line[sizeof(line)-1] = '\0';
605
			cp = line;
615
			cp = line;
606
			switch (*cp) {
616
			switch (*cp) {

Return to bug 884