[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Wed Mar 15 23:38:13 UTC 2017
The branch master has been updated
via 29d1fad78899e5ae2997b19937a175784b21c996 (commit)
from dda12ce4e5c75da95088a1dc81815b80ec18821d (commit)
- Log -----------------------------------------------------------------
commit 29d1fad78899e5ae2997b19937a175784b21c996
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Tue Mar 14 15:10:52 2017 +0100
Fixed a crash in print_notice.
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2935)
-----------------------------------------------------------------------
Summary of changes:
crypto/x509v3/v3_cpols.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c
index f717e13..22c56ba 100644
--- a/crypto/x509v3/v3_cpols.c
+++ b/crypto/x509v3/v3_cpols.c
@@ -413,9 +413,15 @@ static void print_notice(BIO *out, USERNOTICE *notice, int indent)
num = sk_ASN1_INTEGER_value(ref->noticenos, i);
if (i)
BIO_puts(out, ", ");
- tmp = i2s_ASN1_INTEGER(NULL, num);
- BIO_puts(out, tmp);
- OPENSSL_free(tmp);
+ if (num == NULL)
+ BIO_puts(out, "(null)");
+ else {
+ tmp = i2s_ASN1_INTEGER(NULL, num);
+ if (tmp == NULL)
+ return;
+ BIO_puts(out, tmp);
+ OPENSSL_free(tmp);
+ }
}
BIO_puts(out, "\n");
}
More information about the openssl-commits
mailing list