[pkg-opensc-commit] [engine-pkcs11] 79/152: get_pin(): do not dereference mycb->password if mycb is NULL

Eric Dorland eric at moszumanska.debian.org
Mon Oct 19 03:11:18 UTC 2015


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

eric pushed a commit to branch master
in repository engine-pkcs11.

commit aabc99b98a46cbc4787f90aa6aaa28756481f70f
Author: Ludovic Rousseau <ludovic.rousseau+github at gmail.com>
Date:   Fri Oct 24 08:39:04 2008 +0000

    get_pin(): do not dereference mycb->password if mycb is NULL
    
    Fix ticket #11
---
 src/engine_pkcs11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/engine_pkcs11.c b/src/engine_pkcs11.c
index 7fdacc6..31c3bc9 100644
--- a/src/engine_pkcs11.c
+++ b/src/engine_pkcs11.c
@@ -114,7 +114,7 @@ static int get_pin(UI_METHOD * ui_method, void *callback_data)
 	} *mycb = callback_data;
 
 	/* pin in the call back data, copy and use */
-	if (mycb->password) {
+	if (mycb != NULL && mycb->password) {
 		pin = (char *)calloc(MAX_PIN_LENGTH, sizeof(char));
 		if (!pin)
 			return 0;

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



More information about the pkg-opensc-commit mailing list