File openssl-print_notice-NULL_crash.patch of Package compat-openssl098.14113

Index: openssl-0.9.8j/crypto/x509v3/v3_cpols.c
===================================================================
--- openssl-0.9.8j.orig/crypto/x509v3/v3_cpols.c	2016-09-22 17:56:37.531896260 +0200
+++ openssl-0.9.8j/crypto/x509v3/v3_cpols.c	2016-09-22 18:03:53.986854324 +0200
@@ -421,6 +421,8 @@ static void print_notice(BIO *out, USERN
 			num = sk_ASN1_INTEGER_value(ref->noticenos, i);
 			if(i) BIO_puts(out, ", ");
 			tmp = i2s_ASN1_INTEGER(NULL, num);
+			if (tmp == NULL)
+				return;
 			BIO_puts(out, tmp);
 			OPENSSL_free(tmp);
 		}
openSUSE Build Service is sponsored by