summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authormarkus@openbsd.org <markus@openbsd.org>2020-03-06 18:29:14 +0000
committerDamien Miller <djm@mindrot.org>2020-03-13 13:18:31 +1100
commite32ef97a56ae03febfe307688858badae3a70e5a (patch)
treeb58eb25d1605bcb942e3396436bc29c1a1eedba6 /ssh-keygen.c
parent5732d58020309364bf31fa125354e399361006db (diff)
upstream: fix use-after-free in do_download_sk; ok djm
OpenBSD-Commit-ID: 96b49623d297797d4fc069f1f09e13c8811f8863
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 3c6c9a18c..aa4ec0655 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.401 2020/03/06 18:15:04 markus Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.402 2020/03/06 18:29:14 markus 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
@@ -3025,9 +3025,9 @@ do_download_sk(const char *skprovider, const char *device)
3025 free(path); 3025 free(path);
3026 if ((r = sshkey_save_public(keys[i], pubpath, 3026 if ((r = sshkey_save_public(keys[i], pubpath,
3027 keys[i]->sk_application)) != 0) { 3027 keys[i]->sk_application)) != 0) {
3028 free(pubpath);
3029 error("Saving public key \"%s\" failed: %s", 3028 error("Saving public key \"%s\" failed: %s",
3030 pubpath, ssh_err(r)); 3029 pubpath, ssh_err(r));
3030 free(pubpath);
3031 break; 3031 break;
3032 } 3032 }
3033 free(pubpath); 3033 free(pubpath);