[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU libtasn1 branch, master, updated. libtasn1_4.7-27-ga6e0a0b
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU libtasn1 branch, master, updated. libtasn1_4.7-27-ga6e0a0b |
Date: |
Wed, 06 Apr 2016 12:31:06 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".
http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=a6e0a0b58f5cdaf4e9beca5bce69c09808cbb625
The branch, master has been updated
via a6e0a0b58f5cdaf4e9beca5bce69c09808cbb625 (commit)
from 9ec2c56de62085a88eea152941e9b32e3810e5d0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a6e0a0b58f5cdaf4e9beca5bce69c09808cbb625
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Wed Apr 6 13:02:19 2016 +0200
_asn1_extract_der_octet: properly account the bytes read through indefinite
encodings
This prevents infinite recursions in the function loop.
Reported by Pascal Cuoq.
-----------------------------------------------------------------------
Summary of changes:
lib/decoding.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/lib/decoding.c b/lib/decoding.c
index 6fd60d0..4fff03e 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -753,7 +753,7 @@ _asn1_delete_not_used (asn1_node node)
static int
_asn1_extract_der_octet (asn1_node node, const unsigned char *der,
- int der_len, unsigned flags)
+ int der_len, unsigned flags, int *bytes)
{
int len2, len3;
int counter, counter_end;
@@ -799,15 +799,19 @@ _asn1_extract_der_octet (asn1_node node, const unsigned
char *der,
DECR_LEN(der_len, len3);
result =
_asn1_extract_der_octet (node, der + counter + len3,
- der_len, flags);
+ der_len, flags, &len2);
if (result != ASN1_SUCCESS)
return result;
- len2 = 0;
+
+ DECR_LEN(der_len, len2);
}
counter += len2 + len3 + 1;
}
+ if (bytes)
+ *bytes = counter;
+
return ASN1_SUCCESS;
cleanup:
@@ -889,7 +893,7 @@ get_octet_string (asn1_node node, const unsigned char *der,
int der_len,
asn1_length_der (tot_len, temp, &len2);
_asn1_set_value (node, temp, len2);
- ret = _asn1_extract_der_octet (node, der, orig_der_len, flags);
+ ret = _asn1_extract_der_octet (node, der, orig_der_len, flags, NULL);
if (ret != ASN1_SUCCESS)
{
warn();
hooks/post-receive
--
GNU libtasn1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU libtasn1 branch, master, updated. libtasn1_4.7-27-ga6e0a0b,
Nikos Mavrogiannopoulos <=