Global DirectoryString mask fix.
[openssl.git] / crypto / asn1 / a_strnid.c
index 6b10cff99449395ae9120713a1ac2047ac1c3f5d..732e68fe462a72539bdca9fbb5ffded143a2c4a2 100644 (file)
@@ -133,7 +133,7 @@ ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out, const unsigned char *in,
        if(tbl) {
                mask = tbl->mask;
                if(!(tbl->flags & STABLE_NO_MASK)) mask &= global_mask;
-               ret = ASN1_mbstring_ncopy(out, in, inlen, inform, tbl->mask,
+               ret = ASN1_mbstring_ncopy(out, in, inlen, inform, mask,
                                        tbl->minsize, tbl->maxsize);
        } else ret = ASN1_mbstring_copy(out, in, inlen, inform, DIRSTRING_TYPE & global_mask);
        if(ret <= 0) return NULL;