[gnome-keyring/dbus-api] [gck] Don't crash on misformatted init PKCS#11 init strings.



commit c6062ffbb459b75dd875aa00374b4b72042818e1
Author: Stef Walter <stef memberwebs com>
Date:   Sun Nov 8 01:27:30 2009 +0000

    [gck] Don't crash on misformatted init PKCS#11 init strings.
    
    Was asserting on a PKCS#11 init string that looked like:
    
       name = 'value'

 pkcs11/gck/gck-module.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pkcs11/gck/gck-module.c b/pkcs11/gck/gck-module.c
index 2f9aa0f..08af0db 100644
--- a/pkcs11/gck/gck-module.c
+++ b/pkcs11/gck/gck-module.c
@@ -297,8 +297,9 @@ parse_argument (GckModule *self, char *arg)
 		*(value++) = 0;
 
 	g_strstrip (arg);
-	g_strstrip (value);
-	
+	if (value)
+		g_strstrip (value);
+
 	g_return_if_fail (GCK_MODULE_GET_CLASS (self)->parse_argument);
 	GCK_MODULE_GET_CLASS (self)->parse_argument (self, arg, value);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]