From 31c848ccf341175fda2a6424d8d70c6b49a9b720 Mon Sep 17 00:00:00 2001 From: djm Date: Fri, 14 Jan 2022 03:34:00 +0000 Subject: [PATCH] sshsk_load_resident: don't preallocate resp resp is allocated by client_converse(), at which point we lose the original pointer. From Pedro Martelletto; ok dtucker & me --- usr.bin/ssh/ssh-sk-client.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.bin/ssh/ssh-sk-client.c b/usr.bin/ssh/ssh-sk-client.c index 71d639e9571..c00c6339b5b 100644 --- a/usr.bin/ssh/ssh-sk-client.c +++ b/usr.bin/ssh/ssh-sk-client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-sk-client.c,v 1.11 2022/01/14 03:32:52 djm Exp $ */ +/* $OpenBSD: ssh-sk-client.c,v 1.12 2022/01/14 03:34:00 djm Exp $ */ /* * Copyright (c) 2019 Google LLC * @@ -397,8 +397,7 @@ sshsk_load_resident(const char *provider_path, const char *device, *srksp = NULL; *nsrksp = 0; - if ((resp = sshbuf_new()) == NULL || - (kbuf = sshbuf_new()) == NULL || + if ((kbuf = sshbuf_new()) == NULL || (req = sshbuf_new()) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; -- 2.20.1