summaryrefslogtreecommitdiff
path: root/lib/x509/x509_dn.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-05 13:20:44 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-06 12:58:33 +0200
commit2804035ee68ac3edc85383415303d4046375c55d (patch)
tree75bcc269c076a29c71d0985d9bbfeb68bd327299 /lib/x509/x509_dn.c
parent1dab21dc9576166b21a372f1826867e4a15d4cf7 (diff)
downloadgnutls-2804035ee68ac3edc85383415303d4046375c55d.tar.gz
Avoid using ASN1_MAX_NAME_SIZE directly
Since ASN1_MAX_NAME_SIZE refers to a single element in the asn1 tree, it is not suitable to hold the maximum combined name. Instead use a local definition of MAX_NAME_SIZE, which is a multiple of the ASN1_MAX_NAME_SIZE. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/x509/x509_dn.c')
-rw-r--r--lib/x509/x509_dn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/x509/x509_dn.c b/lib/x509/x509_dn.c
index e093fe9d86..effa363fce 100644
--- a/lib/x509/x509_dn.c
+++ b/lib/x509/x509_dn.c
@@ -563,7 +563,7 @@ gnutls_x509_dn_get_rdn_ava(gnutls_x509_dn_t dn,
ASN1_DATA_NODE vnode;
long len;
int lenlen, remlen, ret;
- char rbuf[ASN1_MAX_NAME_SIZE];
+ char rbuf[MAX_NAME_SIZE];
unsigned char cls;
const unsigned char *ptr;