check new_der for NULL too
authorDr. Stephen Henson <steve@openssl.org>
Tue, 10 Nov 2009 00:46:57 +0000 (00:46 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 10 Nov 2009 00:46:57 +0000 (00:46 +0000)
crypto/asn1/asn1_gen.c

index b066dc9eae3a98a5fb4fcfdb16d8212a6998734e..213a8e986c1b37e61e2f3a3a5561a4f1d030b674 100644 (file)
@@ -227,6 +227,8 @@ ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf)
        /* Allocate buffer for new encoding */
 
        new_der = OPENSSL_malloc(len);
+       if (!new_der)
+               goto err;
 
        /* Generate tagged encoding */