summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-keygen.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2015-12-11 03:19:09 +0000
committerdjm <djm@openbsd.org>2015-12-11 03:19:09 +0000
commitc6f1b864f13ac52f7958faff6f1e1ecc7eef3afa (patch)
treec0f64dc8f763616252b2a7c3a0592f8d25e600c2 /usr.bin/ssh/ssh-keygen.c
parentRemove NULL-checks before sshkey_free(). (diff)
downloadwireguard-openbsd-c6f1b864f13ac52f7958faff6f1e1ecc7eef3afa.tar.xz
wireguard-openbsd-c6f1b864f13ac52f7958faff6f1e1ecc7eef3afa.zip
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.
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r--usr.bin/ssh/ssh-keygen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index 6e106a3b55c..34596ef2ea7 100644
--- a/usr.bin/ssh/ssh-keygen.c
+++ b/usr.bin/ssh/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.286 2015/12/11 02:31:47 mmcc Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.287 2015/12/11 03:19:09 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -867,7 +867,7 @@ do_fingerprint(struct passwd *pw)
{
FILE *f;
struct sshkey *public = NULL;
- char *comment = NULL, *cp, *ep, line[16*1024];
+ char *comment = NULL, *cp, *ep, line[SSH_MAX_PUBKEY_BYTES];
int i, invalid = 1;
const char *path;
long int lnum = 0;
@@ -1903,7 +1903,7 @@ do_show_cert(struct passwd *pw)
struct stat st;
int r, is_stdin = 0, ok = 0;
FILE *f;
- char *cp, line[2048];
+ char *cp, line[SSH_MAX_PUBKEY_BYTES];
const char *path;
long int lnum = 0;