From 350a404cb8b4524bab6b039e03b61b9db9fa8821 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Tue, 21 Feb 2006 01:00:08 +0000 Subject: [PATCH] Print out if an OID value is invalid. --- crypto/asn1/a_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c index 0fbc368f0d..a36356e344 100644 --- a/crypto/asn1/a_object.c +++ b/crypto/asn1/a_object.c @@ -246,6 +246,8 @@ int i2a_ASN1_OBJECT(BIO *bp, ASN1_OBJECT *a) return -1; i2t_ASN1_OBJECT(p,i + 1,a); } + if (i <= 0) + return BIO_write(bp, "", 9); BIO_write(bp,p,i); if (p != buf) OPENSSL_free(p); -- 2.25.1