summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-06-02 10:49:55 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-06-03 15:42:22 +0200
commit4f3b6264b2020dd831aec073369238749167149e (patch)
treef7bbc65852ef728ab6e66675bc9b0f6cf769f5f0
parent12635afc552622caaa63d91500d4c1d319785d7a (diff)
downloadlibtasn1-4f3b6264b2020dd831aec073369238749167149e.tar.gz
libtasn1-4f3b6264b2020dd831aec073369238749167149e.tar.bz2
libtasn1-4f3b6264b2020dd831aec073369238749167149e.zip
Add a sanity check in asn1_der_decoding_startEnd()
-rw-r--r--lib/decoding.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/decoding.c b/lib/decoding.c
index 8f6fe8a..54f0167 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -1581,6 +1581,9 @@ asn1_der_decoding_startEnd (asn1_node element, const void *ider, int ider_len,
*end = node_to_find->end;
}
+ if (*end < *start)
+ return ASN1_GENERIC_ERROR;
+
return ASN1_SUCCESS;
}