summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-16 07:18:26 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-05-16 08:54:53 +0200
commitb32eae0501626fa8f28d3746246cef853b6a631e (patch)
treea2e2962f5d707110ab1907fa8e72b154028291ee
parent94c8a2d9f018c22116f5c3fef8b81504a1ab471b (diff)
downloadlibtasn1-b32eae0501626fa8f28d3746246cef853b6a631e.tar.gz
libtasn1-b32eae0501626fa8f28d3746246cef853b6a631e.tar.bz2
libtasn1-b32eae0501626fa8f28d3746246cef853b6a631e.zip
Use the correct max length definition.
-rw-r--r--lib/decoding.c2
-rw-r--r--lib/parser_aux.h2
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/decoding.c b/lib/decoding.c
index 16f202a..813afc0 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -731,7 +731,7 @@ _asn1_get_octet_string (const unsigned char *der, asn1_node node, int *len)
/* copy */
if (node)
{
- unsigned char temp[DER_LEN];
+ unsigned char temp[ASN1_MAX_LENGTH_SIZE];
int ret;
len2 = sizeof (temp);
diff --git a/lib/parser_aux.h b/lib/parser_aux.h
index bf37852..f1e9a07 100644
--- a/lib/parser_aux.h
+++ b/lib/parser_aux.h
@@ -22,8 +22,6 @@
#ifndef _PARSER_AUX_H
#define _PARSER_AUX_H
-#define DER_LEN 16
-
/***************************************/
/* Functions used by ASN.1 parser */
/***************************************/