[Pcsclite-cvs-commit] CVS PKCS11/src

CVS User rousseau ludovic.rousseau@free.fr
Sat, 22 Jan 2005 08:39:32 -0700


Update of /cvsroot/muscleapps/PKCS11/src
In directory haydn:/tmp/cvs-serv20085

Modified Files:
	p11_general.c 
Log Message:
CK_DEFINE_FUNCTION(): fix a loading problem.
http://archives.neohapsis.com/archives/dev/muscle/2005-q1/0044.html

Thanks to Chris Osgood for the patch


--- /cvsroot/muscleapps/PKCS11/src/p11_general.c	2002/10/26 02:30:35	1.11
+++ /cvsroot/muscleapps/PKCS11/src/p11_general.c	2005/01/22 15:39:31	1.12
@@ -1,6 +1,6 @@
 /******************************************************************************
 ** 
-**  $Id: p11_general.c,v 1.11 2002/10/26 02:30:35 oznet Exp $
+**  $Id: p11_general.c,v 1.12 2005/01/22 15:39:31 rousseau Exp $
 **
 **  Package: PKCS-11
 **  Author : Chris Osgood <oznet@mac.com>
@@ -41,11 +41,11 @@
         rv = CKR_CRYPTOKI_ALREADY_INITIALIZED;
     else
     {
-        if (!pInitArgs)
-            init_args = &blank_init_args;
-        else 
+		init_args = &blank_init_args;
+
+        if (pInitArgs)
         {
-            init_args = (CK_C_INITIALIZE_ARGS *)pInitArgs;
+            memcpy(init_args, pInitArgs, sizeof(CK_C_INITIALIZE_ARGS));
             log_Log(LOG_LOW, "Init flags: 0x%X", init_args->flags);
         }