summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2024-08-20 11:10:05 +0000
committerDamien Miller <djm@cvs.openbsd.org>2024-08-20 11:10:05 +0000
commitd62dc29abaf839ab8ef4ae92a88f4425804131de (patch)
treeb1d4ed6c2fb20050077d8b606bf963b70f41b93c /usr.bin/ssh
parent6bf95d7b92a2fdd716cf6bfbaef5bc893ab1c69d (diff)
actually use the length parameter that was passed in rather than a
constant (this makes no difference in practice because the length is always the same); reported by martin AT nmkd.net
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/sshkey.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshkey.c b/usr.bin/ssh/sshkey.c
index 2727aacbd39..d04cc522cee 100644
--- a/usr.bin/ssh/sshkey.c
+++ b/usr.bin/ssh/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.144 2024/08/20 03:48:30 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.145 2024/08/20 11:10:04 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Alexander von Gernler. All rights reserved.
@@ -717,7 +717,7 @@ sshkey_prekey_alloc(u_char **prekeyp, size_t len)
u_char *prekey;
*prekeyp = NULL;
- if ((prekey = mmap(NULL, SSHKEY_SHIELD_PREKEY_LEN, PROT_READ|PROT_WRITE,
+ if ((prekey = mmap(NULL, len, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE|MAP_CONCEAL, -1, 0)) == MAP_FAILED)
return SSH_ERR_SYSTEM_ERROR;
*prekeyp = prekey;