summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-09-04 10:18:34 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-09-04 10:20:16 +0200
commit9e832a6d5072263a1fea554c654e29ccf918e059 (patch)
tree89de00d7ed593d8e117a25364c6f5b5d261b4ddb /lib
parent14a5a48f472064c4e9bb43b1b8292ff9dd9064f4 (diff)
downloadlibtasn1-9e832a6d5072263a1fea554c654e29ccf918e059.tar.gz
corrected regression which caused the failure of octet string extraction
This affected octet strings placed at the end of the structure. Fixes issue with OCSP response parsing in gnutls.
Diffstat (limited to 'lib')
-rw-r--r--lib/decoding.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/decoding.c b/lib/decoding.c
index 0e79aad..0b5bd10 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -778,6 +778,7 @@ _asn1_get_octet_string (asn1_node node, const unsigned char *der, int der_len,
{
int len2, len3, counter, tot_len, indefinite;
int result;
+ int orig_der_len = der_len;
counter = 0;
@@ -845,7 +846,7 @@ _asn1_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, der_len, flags);
+ ret = _asn1_extract_der_octet (node, der, orig_der_len, flags);
if (ret != ASN1_SUCCESS)
{
warn();