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
9191
9292 /* Extract the length */
9393 len = data[dp++];
94− if (len < 0x7f) {
94+ if (len <= 0x7f) {
9595 dp += len;
9696 goto next_tag;
9797 }