]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: sshsk_load_resident: don't preallocate resp
authordjm@openbsd.org <djm@openbsd.org>
Fri, 14 Jan 2022 03:34:00 +0000 (03:34 +0000)
committerDamien Miller <djm@mindrot.org>
Fri, 14 Jan 2022 03:40:40 +0000 (14:40 +1100)
resp is allocated by client_converse(), at which point we lose
the original pointer.

From Pedro Martelletto; ok dtucker & me

OpenBSD-Commit-ID: 1f1b5ea3282017d6584dfed4f8370dc1db1f44b1

ssh-sk-client.c

index 7b5752a6e754f7a4c81adeaa74cf49a855248ca1..321fe53a2d9195b04ede36d32e71e7529b5af209 100644 (file)
@@ -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
  *
@@ -407,8 +407,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;