Fix typo and avoid warning.
authorDr. Stephen Henson <steve@openssl.org>
Thu, 28 Feb 2008 13:18:26 +0000 (13:18 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 28 Feb 2008 13:18:26 +0000 (13:18 +0000)
crypto/asn1/a_type.c
crypto/x509/x509_att.c

index 52523d210afa429e03b7405f709138412d2df197..90f14241e757f9ff52f12c2f66ed065c753039a5 100644 (file)
@@ -100,7 +100,7 @@ int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value)
        else
                {
                ASN1_STRING *sdup;
-               sdup = ASN1_STRING_dup(sdup);
+               sdup = ASN1_STRING_dup(value);
                if (!sdup)
                        return 0;
                ASN1_TYPE_set(a, type, sdup);
index ef5c2b9a449ef998f5ec3ee7854b1c8e906f6ea7..c61a047531a6c8e2cd0fdb51656dd7cd054c97a2 100644 (file)
@@ -286,8 +286,8 @@ int X509_ATTRIBUTE_set1_object(X509_ATTRIBUTE *attr, const ASN1_OBJECT *obj)
 int X509_ATTRIBUTE_set1_data(X509_ATTRIBUTE *attr, int attrtype, const void *data, int len)
 {
        ASN1_TYPE *ttmp;
-       ASN1_STRING *stmp;
-       int atype;
+       ASN1_STRING *stmp = NULL;
+       int atype = 0;
        if (!attr) return 0;
        if(attrtype & MBSTRING_FLAG) {
                stmp = ASN1_STRING_set_by_NID(NULL, data, len, attrtype,