[openssh-commits] [openssh] 01/07: upstream: memleak in error path

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Nov 25 12:26:00 AEDT 2019


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit d2b0f88178ec9e3f11b606bf1004ac2fe541a2c3
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Mon Nov 25 00:38:17 2019 +0000

    upstream: memleak in error path
    
    OpenBSD-Commit-ID: 93488431bf02dde85a854429362695d2d43d9112
---
 ssh-ecdsa-sk.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ssh-ecdsa-sk.c b/ssh-ecdsa-sk.c
index 0d4d01ca..f33fac71 100644
--- a/ssh-ecdsa-sk.c
+++ b/ssh-ecdsa-sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-ecdsa-sk.c,v 1.2 2019/11/19 22:23:19 djm Exp $ */
+/* $OpenBSD: ssh-ecdsa-sk.c,v 1.3 2019/11/25 00:38:17 djm Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  * Copyright (c) 2010 Damien Miller.  All rights reserved.
@@ -124,8 +124,10 @@ ssh_ecdsa_sk_verify(const struct sshkey *key,
 	}
 
 	/* Reconstruct data that was supposedly signed */
-	if ((original_signed = sshbuf_new()) == NULL)
-		return SSH_ERR_ALLOC_FAIL;
+	if ((original_signed = sshbuf_new()) == NULL) {
+		ret = SSH_ERR_ALLOC_FAIL;
+		goto out;
+	}
 	if ((ret = ssh_digest_memory(SSH_DIGEST_SHA256, data, datalen,
 	    msghash, sizeof(msghash))) != 0)
 		goto out;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list