summaryrefslogtreecommitdiff
path: root/lib/decoding.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-17 09:11:10 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-17 09:16:07 +0200
commite47b2a0651ffe1867c844968ade7f6127957bf13 (patch)
tree9db3c89f8cefaac87be72943c15f52d16f908be6 /lib/decoding.c
parente3a8295c5784d36e1a2b1fb0823fda164366e067 (diff)
downloadlibtasn1-e47b2a0651ffe1867c844968ade7f6127957bf13.tar.gz
libtasn1-e47b2a0651ffe1867c844968ade7f6127957bf13.tar.bz2
libtasn1-e47b2a0651ffe1867c844968ade7f6127957bf13.zip
Reverted ltostr() changes as the cause a significant delay to the library.
The best approach would be to eliminate the need for ltostr() completely. Added LTOSTR_MAX_SIZE, to avoid overflows.
Diffstat (limited to 'lib/decoding.c')
-rw-r--r--lib/decoding.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/decoding.c b/lib/decoding.c
index f85451f..93bc962 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -302,7 +302,7 @@ _asn1_get_objectid_der (const unsigned char *der, int der_len, int *ret_len,
{
int len_len, len, k;
int leading;
- char temp[20];
+ char temp[LTOSTR_MAX_SIZE];
unsigned long val, val1;
*ret_len = 0;
@@ -1952,7 +1952,7 @@ asn1_der_decoding_element (asn1_node * structure, const char *elementName,
counter += len2;
if (len3 > 0)
{
- _asn1_ltostr (counter + len3, temp, sizeof(temp));
+ _asn1_ltostr (counter + len3, temp);
tlen = strlen (temp);
if (tlen > 0)
@@ -2035,7 +2035,7 @@ asn1_der_decoding_element (asn1_node * structure, const char *elementName,
counter += len2;
if (len3)
{
- _asn1_ltostr (counter + len3, temp, sizeof(temp));
+ _asn1_ltostr (counter + len3, temp);
tlen = strlen (temp);
if (tlen > 0)