#include "asn1_locl.h"
typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY;
-DECLARE_STACK_OF(STACK_OF_X509_NAME_ENTRY);
+DECLARE_STACK_OF(STACK_OF_X509_NAME_ENTRY)
static int x509_name_ex_d2i(ASN1_VALUE **val,
const unsigned char **in, long len,
*val = nm.a;
*in = p;
return ret;
- err:
+err:
+ if (nm.x != NULL)
+ X509_NAME_free(nm.x);
ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR);
return 0;
}
out->type = in->type;
if (!ASN1_STRING_set(out, in->data, in->length))
return 0;
+ return 1;
}
out->type = V_ASN1_UTF8STRING;
}
else
{
- *to++ = tolower(*from++);
+ *to++ = tolower(*from);
+ from++;
i++;
}
}