summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-12-11 03:19:09 +0000
committerDamien Miller <djm@mindrot.org>2015-12-18 14:49:32 +1100
commitcce6a36bb95e81fa8bfb46daf22eabcf13afc352 (patch)
tree7867054bb1d00b831e167ab0b552c797f40f69e9 /ssh-keygen.c
parent89540b6de025b80404a0cb8418c06377f3f98848 (diff)
upstream commit
use SSH_MAX_PUBKEY_BYTES consistently as buffer size when reading key files. Increase it to match the size of the buffers already being used. Upstream-ID: 1b60586b484b55a947d99a0b32bd25e0ced56fae
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index ff3f710de..c3ec4f882 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.286 2015/12/11 02:31:47 mmcc Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.287 2015/12/11 03:19:09 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -880,7 +880,7 @@ do_fingerprint(struct passwd *pw)
880{ 880{
881 FILE *f; 881 FILE *f;
882 struct sshkey *public = NULL; 882 struct sshkey *public = NULL;
883 char *comment = NULL, *cp, *ep, line[16*1024]; 883 char *comment = NULL, *cp, *ep, line[SSH_MAX_PUBKEY_BYTES];
884 int i, invalid = 1; 884 int i, invalid = 1;
885 const char *path; 885 const char *path;
886 long int lnum = 0; 886 long int lnum = 0;
@@ -1918,7 +1918,7 @@ do_show_cert(struct passwd *pw)
1918 struct stat st; 1918 struct stat st;
1919 int r, is_stdin = 0, ok = 0; 1919 int r, is_stdin = 0, ok = 0;
1920 FILE *f; 1920 FILE *f;
1921 char *cp, line[2048]; 1921 char *cp, line[SSH_MAX_PUBKEY_BYTES];
1922 const char *path; 1922 const char *path;
1923 long int lnum = 0; 1923 long int lnum = 0;
1924 1924