[openssh-commits] [openssh] 11/15: upstream: avoid possible NULL deref; from Pedro Martelletto
git+noreply at mindrot.org
git+noreply at mindrot.org
Wed May 27 21:55:10 AEST 2020
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 2a63ce5cd6d0e782783bf721462239b03757dd49
Author: djm at openbsd.org <djm at openbsd.org>
Date: Mon May 18 04:29:35 2020 +0000
upstream: avoid possible NULL deref; from Pedro Martelletto
OpenBSD-Commit-ID: e6099c3fbb70aa67eb106e84d8b43f1fa919b721
---
ssh-keygen.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/ssh-keygen.c b/ssh-keygen.c
index bcf1ece3..40590331 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.410 2020/05/13 09:55:57 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.411 2020/05/18 04:29:35 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -2954,14 +2954,16 @@ do_download_sk(const char *skprovider, const char *device)
&keys, &nkeys)) != 0) {
if (i == 0 && r == SSH_ERR_KEY_WRONG_PASSPHRASE)
continue;
- freezero(pin, strlen(pin));
+ if (pin != NULL)
+ freezero(pin, strlen(pin));
error("Unable to load resident keys: %s", ssh_err(r));
return -1;
}
}
if (nkeys == 0)
logit("No keys to download");
- freezero(pin, strlen(pin));
+ if (pin != NULL)
+ freezero(pin, strlen(pin));
for (i = 0; i < nkeys; i++) {
if (keys[i]->type != KEY_ECDSA_SK &&
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list