[pkg-opensc-commit] [libp11] 97/239: Risto Laanoja: possible free(NULL) on specific case

Eric Dorland eric at moszumanska.debian.org
Sat Oct 17 06:21:13 UTC 2015


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

eric pushed a commit to branch master
in repository libp11.

commit b5ccef5eecd0ddadde2c9b0a54d069ef8de92901
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date:   Fri Jun 29 06:21:59 2007 +0000

    Risto Laanoja: possible free(NULL) on specific case
---
 src/p11_ops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/p11_ops.c b/src/p11_ops.c
index f3e4ec6..8ec7067 100644
--- a/src/p11_ops.c
+++ b/src/p11_ops.c
@@ -90,7 +90,8 @@ PKCS11_sign(int type, const unsigned char *m, unsigned int m_len,
 				    sigret, &ck_sigsize));
 	}
 	*siglen = ck_sigsize;
-	free(encoded);
+	if (encoded != NULL)  /* NULL on SSL case */
+		free(encoded);
 
 	if (rv) {
 		PKCS11err(PKCS11_F_PKCS11_RSA_SIGN, pkcs11_map_err(rv));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list