summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scan_asn1length.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scan_asn1length.c b/scan_asn1length.c
index 9e20fae..150de94 100644
--- a/scan_asn1length.c
+++ b/scan_asn1length.c
@@ -14,12 +14,12 @@ size_t scan_asn1length(const char* src,const char* max,size_t* value) {
c&=0x7f;
if (!c) return 0; /* length 0x80 means indefinite length encoding, not supported here */
l=(unsigned char)src[1];
- if (l==0) return 0; /* not minimally encoded: 0x81 0x00 instead of 0x00 */
+ //if (l==0) return 0; /* not minimally encoded: 0x81 0x00 instead of 0x00 XXX: We need to support this for Active Directory support :/ */
if (c>sizeof(l)) return 0; /* too many bytes, does not fit into target integer type */
if (c+1>len) return 0; /* not enough data in input buffer */
for (i=2; i<=c; ++i)
l=l*256+(unsigned char)src[i];
- if (l<0x7f) return 0; /* not minimally encoded: 0x81 0x70 instead of 0x70 */
+ //if (l<0x7f) return 0; /* not minimally encoded: 0x81 0x70 instead of 0x70 XXX: Same AD issue as above */
}
if (l>len-i) return 0; /* if the length would not fit into the buffer, return 0 */
*value=l;