i give up. reuse problem is unfixable. dlg says puppet crashes.
authortedu <tedu@openbsd.org>
Sun, 4 May 2014 19:06:40 +0000 (19:06 +0000)
committertedu <tedu@openbsd.org>
Sun, 4 May 2014 19:06:40 +0000 (19:06 +0000)
lib/libcrypto/asn1/tasn_dec.c
lib/libssl/src/crypto/asn1/tasn_dec.c

index d86bc4e..c8b379f 100644 (file)
@@ -382,14 +382,10 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
                        goto err;
                }
 
-               if (!*pval) {
-                       if (!ASN1_item_ex_new(pval, it)) {
-                               ASN1err(ASN1_F_ASN1_ITEM_EX_D2I,
-                                   ERR_R_NESTED_ASN1_ERROR);
-                               goto err;
-                       }
-               } else {
-                       memset(*pval, 0, it->size);
+               if (!*pval && !ASN1_item_ex_new(pval, it)) {
+                       ASN1err(ASN1_F_ASN1_ITEM_EX_D2I,
+                           ERR_R_NESTED_ASN1_ERROR);
+                       goto err;
                }
 
                if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
index d86bc4e..c8b379f 100644 (file)
@@ -382,14 +382,10 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
                        goto err;
                }
 
-               if (!*pval) {
-                       if (!ASN1_item_ex_new(pval, it)) {
-                               ASN1err(ASN1_F_ASN1_ITEM_EX_D2I,
-                                   ERR_R_NESTED_ASN1_ERROR);
-                               goto err;
-                       }
-               } else {
-                       memset(*pval, 0, it->size);
+               if (!*pval && !ASN1_item_ex_new(pval, it)) {
+                       ASN1err(ASN1_F_ASN1_ITEM_EX_D2I,
+                           ERR_R_NESTED_ASN1_ERROR);
+                       goto err;
                }
 
                if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))