[openssh-commits] [openssh] branch master updated: upstream: actually use the length parameter that was passed in rather
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue Aug 20 21:11:41 AEST 2024
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
The following commit(s) were added to refs/heads/master by this push:
new 2b176211 upstream: actually use the length parameter that was passed in rather
2b176211 is described below
commit 2b1762115481ff2b7a60fd4db2ae69b725437462
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Aug 20 11:10:04 2024 +0000
upstream: 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
OpenBSD-Commit-ID: 4aecce232c2fe9b16e9217ff6bcb3c848d853e7e
---
sshkey.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sshkey.c b/sshkey.c
index 384fb59b..7d856740 100644
--- a/sshkey.c
+++ b/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.
@@ -747,15 +747,15 @@ sshkey_prekey_alloc(u_char **prekeyp, size_t len)
*prekeyp = NULL;
#if defined(MAP_CONCEAL)
- 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;
#elif defined(MAP_NOCORE)
- 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_NOCORE, -1, 0)) == MAP_FAILED)
return SSH_ERR_SYSTEM_ERROR;
#elif defined(MADV_DONTDUMP)
- 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, -1, 0)) == MAP_FAILED)
return SSH_ERR_SYSTEM_ERROR;
(void)madvise(prekey, len, MADV_DONTDUMP);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list