summaryrefslogtreecommitdiff
path: root/security/openssl/patches/patch-am
blob: c34822b608fea11597e5c90cded17e58b01f2ee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
$NetBSD: patch-am,v 1.5 2008/10/25 12:04:34 adrianp Exp $

--- crypto/x509/x509_att.c.orig	2008-04-02 12:11:51.000000000 +0100
+++ crypto/x509/x509_att.c
@@ -303,7 +303,7 @@ 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, data))
 			goto err;