diff -Naur openssl-0.9.8h-old/crypto/x509/x509_att.c openssl-0.9.8h-new/crypto/x509/x509_att.c --- openssl-0.9.8h-old/crypto/x509/x509_att.c 2008-04-02 04:11:51.000000000 -0700 +++ openssl-0.9.8h-new/crypto/x509/x509_att.c 2008-11-11 19:55:05.000000000 -0800 @@ -303,7 +303,7 @@ } 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, data)) goto err;