summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-10-22 16:05:55 +0200
committerRusty Russell <rusty@rustcorp.com.au>2012-12-05 01:57:39 +0100
commitf3537f91f9be2ce5fcbaa1aa6d787ad0436daec6 (patch)
tree7e3b48605e275e89385b9602c017993441291664
parentMODSIGN: Don't use enum-type bitfields in module signature info block (diff)
downloadlinux-f3537f91f9be2ce5fcbaa1aa6d787ad0436daec6.tar.xz
linux-f3537f91f9be2ce5fcbaa1aa6d787ad0436daec6.zip
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 <dhowells@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--lib/asn1_decoder.c2
1 files changed, 1 insertions, 1 deletions
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;
}