From f6952c5cd295882b9a089492d75a2932b1b1230d Mon Sep 17 00:00:00 2001 From: leitner Date: Sun, 3 Sep 2023 17:50:19 +0000 Subject: [PATCH] true is encoded as 0xff, not 1 (thanks Christian Ullrich) --- scan_asn1BOOLEAN.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scan_asn1BOOLEAN.c b/scan_asn1BOOLEAN.c index 99bb7c1..a659103 100644 --- a/scan_asn1BOOLEAN.c +++ b/scan_asn1BOOLEAN.c @@ -8,7 +8,7 @@ size_t scan_asn1BOOLEAN(const char* src,const char* max,unsigned long* val) { long ltmp; if ((tmp=scan_asn1int(src,max,&tc,&tt,&tag,<mp))) if (tc==UNIVERSAL && tt==PRIMITIVE && tag==BOOLEAN) { - if (ltmp!=0 && ltmp!=1) return 0; + if (ltmp!=0 && ltmp!=255) return 0; *val=(unsigned long)ltmp; return tmp; }