summaryrefslogtreecommitdiffstats
path: root/crypto/asn1
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2012-02-27 18:45:18 +0000
committerDr. Stephen Henson <steve@openssl.org>2012-02-27 18:45:18 +0000
commit250f979237e32cb28bf034585d64fe9fb71b1dcc (patch)
treee7d8408b9915f7e403ac761c972e4d182b9c211a /crypto/asn1
parentb527b6e8ff743702c7c503a1b79050127eb5fe7a (diff)
PR: 2736
Reported by: Remi Gacogne <rgacogne-bugs@coredump.fr> Preserve unused bits value in non-canonicalised ASN1_STRING structures by using ASN1_STRING_copy which preseves flags.
Diffstat (limited to 'crypto/asn1')
-rw-r--r--crypto/asn1/x_name.c3
1 files changed, 1 insertions, 2 deletions
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;
}