projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4f78ff
)
Handle embed flag in ASN1_STRING_copy().
author
Dr. Stephen Henson
<steve@openssl.org>
Sun, 11 Oct 2015 22:25:08 +0000
(23:25 +0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Thu, 15 Oct 2015 14:36:57 +0000
(15:36 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/asn1/asn1_lib.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/asn1_lib.c
b/crypto/asn1/asn1_lib.c
index 12248dbf780a83231e064fadfd1222a0cb1d72e9..ef9223c485b7fa8a57762245dae121c9b7ce8bc4 100644
(file)
--- a/
crypto/asn1/asn1_lib.c
+++ b/
crypto/asn1/asn1_lib.c
@@
-284,7
+284,9
@@
int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str)
dst->type = str->type;
if (!ASN1_STRING_set(dst, str->data, str->length))
return 0;
- dst->flags = str->flags;
+ /* Copy flags but preserve embed value */
+ dst->flags &= ASN1_STRING_FLAG_EMBED;
+ dst->flags |= str->flags & ~ASN1_STRING_FLAG_EMBED;
return 1;
}