Hi all,

there is a bug in libopensc/asn1.c in line 1004, which triggers a
segmentation fault. In short, the last parameter to sc_debug may (and in
my case will) dereference NULL.

This bug was introduced with changeset 4118. Befor revision 4118 this
behavior only occured with debug level >= 6.

Best regards,
Andre Zepezauer

Index: libopensc/asn1.c
===================================================================
--- libopensc/asn1.c	(revision 4390)
+++ libopensc/asn1.c	(working copy)
@@ -1000,9 +1000,11 @@
 	case SC_ASN1_INTEGER:
 	case SC_ASN1_ENUMERATED:
 		if (parm != NULL)
+		{
 			r = sc_asn1_decode_integer(obj, objlen, (int *) entry->parm);
 		sc_debug(ctx, SC_LOG_DEBUG_ASN1, "%*.*sdecoding '%s' returned %d\n", depth, depth, "", entry->name, *((int *) entry->parm));
 
+		}
 		break;
 	case SC_ASN1_BIT_STRING_NI:
 	case SC_ASN1_BIT_STRING:
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to