[pkg-opensc-commit] [libp11] 136/239: fix segfault in new code.
Eric Dorland
eric at moszumanska.debian.org
Sat Oct 17 06:21:18 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 ac9d44f73eba12896cb0166c0054a074bda80738
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date: Thu Jul 31 14:41:02 2008 +0000
fix segfault in new code.
---
NEWS | 1 +
src/p11_load.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/NEWS b/NEWS
index 522ccf7..635d942 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ New in 0.2.4; 2008-07-31; Andreas Jellinghaus
The build system can produce outputs for *NIX, cygwin and native
windows (using mingw).
* added PKCS11_CTX_init_args (David Smith).
+* fix segfault in init_args code.
* implemented PKCS11_private_encrypt (with PKCS11_sign now based on it)
(Arnaud Ebalard)
diff --git a/src/p11_load.c b/src/p11_load.c
index 02ecdb6..04fedcb 100644
--- a/src/p11_load.c
+++ b/src/p11_load.c
@@ -46,7 +46,7 @@ PKCS11_CTX *PKCS11_CTX_new(void)
void *PKCS11_CTX_init_args(PKCS11_CTX * ctx, const char *init_args)
{
PKCS11_CTX_private *priv = PRIVCTX(ctx);
- priv->init_args = strdup(init_args);
+ priv->init_args = init_args ? strdup(init_args) : NULL;
}
/*
--
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