From e47b2a0651ffe1867c844968ade7f6127957bf13 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sat, 17 May 2014 09:11:10 +0200 Subject: 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. --- lib/decoding.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/decoding.c') 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) -- cgit v1.2.3