[pkg-opensc-commit] [engine-pkcs11] 73/152: fix segfault in new code.
Eric Dorland
eric at moszumanska.debian.org
Mon Oct 19 03:11:17 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 2cd685e94ec1e71e28fe77e191cc21e9a44c8170
Author: Andreas Jellinghaus <andreas at ionisiert.de>
Date: Thu Jul 31 14:40:03 2008 +0000
fix segfault in new code.
---
NEWS | 1 +
src/engine_pkcs11.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index bf4b586..89fdcca 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ New in 0.1.5; 2008-07-31; Andreas Jellinghaus
windows (using mingw).
* cleanup pin code, always use MAX_PIN_LENGTH, proper cleanup.
* new use PKCS11_CTX_init_args (David Smith)
+* fix segfault in init_args code.
* needs new version of libp11 (0.2.4 or later).
New in 0.1.4; 2007-07-11; Andreas Jellinghaus
diff --git a/src/engine_pkcs11.c b/src/engine_pkcs11.c
index b29ceb7..44da40e 100644
--- a/src/engine_pkcs11.c
+++ b/src/engine_pkcs11.c
@@ -63,7 +63,7 @@ static char *init_args = NULL;
int set_module(const char *modulename)
{
- module = strdup(modulename);
+ module = modulename ? strdup(modulename) : NULL;
return 1;
}
@@ -145,7 +145,7 @@ static int get_pin(UI_METHOD * ui_method, void *callback_data)
int set_init_args(const char *init_args_orig)
{
- init_args = strdup(init_args_orig);
+ init_args = init_args_orig ? strdup(init_args_orig) : NULL;
return 1;
}
--
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