From: Dr. Stephen Henson Date: Mon, 27 Feb 2012 18:45:06 +0000 (+0000) Subject: PR: 2736 X-Git-Tag: OpenSSL_1_0_0h~14 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2f31308b1737fc7ab0f3421851a07efa0487f078;p=oweals%2Fopenssl.git PR: 2736 Reported by: Remi Gacogne Preserve unused bits value in non-canonicalised ASN1_STRING structures by using ASN1_STRING_copy which preseves flags. --- diff --git a/crypto/asn1/x_name.c b/crypto/asn1/x_name.c index 49be08b4da..d7c2318693 100644 --- a/crypto/asn1/x_name.c +++ b/crypto/asn1/x_name.c @@ -399,8 +399,7 @@ static int asn1_string_canon(ASN1_STRING *out, ASN1_STRING *in) /* If type not in bitmask just copy string across */ if (!(ASN1_tag2bit(in->type) & ASN1_MASK_CANON)) { - out->type = in->type; - if (!ASN1_STRING_set(out, in->data, in->length)) + if (!ASN1_STRING_copy(out, in)) return 0; return 1; }