From a70a49a01871e655a76d108eaa09f0c7fce04c5a Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Thu, 28 Feb 2008 13:18:26 +0000 Subject: [PATCH] Fix typo and avoid warning. --- crypto/asn1/a_type.c | 2 +- crypto/x509/x509_att.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c index 52523d210a..90f14241e7 100644 --- a/crypto/asn1/a_type.c +++ b/crypto/asn1/a_type.c @@ -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); diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c index ef5c2b9a44..c61a047531 100644 --- a/crypto/x509/x509_att.c +++ b/crypto/x509/x509_att.c @@ -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, -- 2.34.1