From: David Howells Date: Mon, 22 Oct 2012 14:05:55 +0000 (+0100) Subject: ASN.1: Fix an indefinite length skip error X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f3537f91f9be2ce5fcbaa1aa6d787ad0436daec6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ASN.1: Fix an indefinite length skip error Fix an error in asn1_find_indefinite_length() whereby small definite length elements of size 0x7f are incorrecly classified as non-small. Without this fix, an error will be given as the length of the length will be perceived as being very much greater than the maximum supported size. Signed-off-by: David Howells Signed-off-by: Rusty Russell --- diff --git a/lib/asn1_decoder.c b/lib/asn1_decoder.c index de2c8b5a715b..5293d2433029 100644 --- a/lib/asn1_decoder.c +++ b/lib/asn1_decoder.c @@ -91,7 +91,7 @@ next_tag: /* Extract the length */ len = data[dp++]; - if (len < 0x7f) { + if (len <= 0x7f) { dp += len; goto next_tag; }