File opensc-0_13_0-CVE-2019-15946.patch of Package opensc.18766

Index: opensc-0.13.0/src/libopensc/asn1.c
===================================================================
--- opensc-0.13.0.orig/src/libopensc/asn1.c
+++ opensc-0.13.0/src/libopensc/asn1.c
@@ -1271,7 +1271,7 @@ static int asn1_decode_entry(sc_context_
 
 			/* Strip off padding zero */
 			if ((entry->flags & SC_ASN1_UNSIGNED)
-			 && obj[0] == 0x00 && objlen > 1) {
+					&& objlen > 1 && obj[0] == 0x00) {
 				objlen--;
 				obj++;
 			}
openSUSE Build Service is sponsored by