History

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.

David Howells committed 14 years ago

Commit f3537f91 parent 12e130b1 file · +1 −1Browse files

Unified · Split

lib/asn1_decoder.c+1−1
@@ -91,7 +91,7 @@ next_tag: · 90 unmodified lines
91 91
92 /* Extract the length */92 /* Extract the length */
93 len = data[dp++];93 len = data[dp++];
94 if (len < 0x7f) {94 if (len <= 0x7f) {
95 dp += len;95 dp += len;
96 goto next_tag;96 goto next_tag;
97 }97 }