File bug467437.patch of Package openssl
Index: openssl-0.9.8h/crypto/x509/x509_att.c
===================================================================
--- openssl-0.9.8h.orig/crypto/x509/x509_att.c
+++ openssl-0.9.8h/crypto/x509/x509_att.c
@@ -303,9 +303,9 @@ int X509_ATTRIBUTE_set1_data(X509_ATTRIB
}
if(!(attr->value.set = sk_ASN1_TYPE_new_null())) goto err;
if(!(ttmp = ASN1_TYPE_new())) goto err;
- if (len == -1)
+ if ((len == -1) && !(attrtype & MBSTRING_FLAG))
{
- if (!ASN1_TYPE_set1(ttmp, attrtype, stmp))
+ if (!ASN1_TYPE_set1(ttmp, attrtype, data))
goto err;
}
else