|
|
@@ -71,6 +71,13 @@ |
|
|
|
typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY; |
|
|
|
DECLARE_STACK_OF(STACK_OF_X509_NAME_ENTRY) |
|
|
|
|
|
|
|
/* |
|
|
|
* Maximum length of X509_NAME: much larger than anything we should |
|
|
|
* ever see in practice. |
|
|
|
*/ |
|
|
|
|
|
|
|
#define X509_NAME_MAX (1024 * 1024) |
|
|
|
|
|
|
|
static int x509_name_ex_d2i(ASN1_VALUE **val, |
|
|
|
const unsigned char **in, long len, |
|
|
|
const ASN1_ITEM *it, |
|
|
@@ -208,6 +215,10 @@ static int x509_name_ex_d2i(ASN1_VALUE **val, |
|
|
|
int ret; |
|
|
|
STACK_OF(X509_NAME_ENTRY) *entries; |
|
|
|
X509_NAME_ENTRY *entry; |
|
|
|
/* Bound the size of an X509_NAME we are willing to parse. */ |
|
|
|
if (len > X509_NAME_MAX) { |
|
|
|
len = X509_NAME_MAX; |
|
|
|
} |
|
|
|
q = p; |
|
|
|
|
|
|
|
/* Get internal representation of Name */ |
|
|
|