Remove redundant ASN1_INTEGER_set call
authorEric Brown <browne@vmware.com>
Thu, 16 Aug 2018 15:34:39 +0000 (08:34 -0700)
committerPauli <paul.dale@oracle.com>
Sun, 2 Sep 2018 21:27:52 +0000 (07:27 +1000)
This trivial patch removes a duplicated call to ASN1_INTEGER_set.

Fixes Issue #6977

Signed-off-by: Eric Brown <browne@vmware.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/6984)

(cherry picked from commit 59701e6363531cddef5b2114c0127b8453deb1f3)

crypto/pkcs7/pk7_lib.c

index 69c68cf5f3d5b451740450d741c3f7adfccb7e9d..c7d71811506a42f4b902fd0390810b89104a252c 100644 (file)
@@ -134,7 +134,6 @@ int PKCS7_set_type(PKCS7 *p7, int type)
         if ((p7->d.signed_and_enveloped = PKCS7_SIGN_ENVELOPE_new())
             == NULL)
             goto err;
-        ASN1_INTEGER_set(p7->d.signed_and_enveloped->version, 1);
         if (!ASN1_INTEGER_set(p7->d.signed_and_enveloped->version, 1))
             goto err;
         p7->d.signed_and_enveloped->enc_data->content_type