diff --git a/scan_asn1generic.c b/scan_asn1generic.c index cc9974d..bf7c37f 100644 --- a/scan_asn1generic.c +++ b/scan_asn1generic.c @@ -235,7 +235,9 @@ stringmain: if (*fmt=='c') { if (tc!=PRIVATE || tt!=CONSTRUCTED) goto error; - *desttag=tag; + *desttag=tag; // gcc -fanalyzer gives a false positive here. + // if we get here, *fmt was 'c' and we came in via the "case 'c'" + // above which set desttag to something the caller provided. } else { if (tc!=UNIVERSAL || tt!=CONSTRUCTED || tag!=(*fmt=='{'?SEQUENCE_OF:SET_OF)) goto error; diff --git a/scan_ldapsearchfilter.c b/scan_ldapsearchfilter.c index 0f3eb02..db81e7f 100644 --- a/scan_ldapsearchfilter.c +++ b/scan_ldapsearchfilter.c @@ -101,6 +101,7 @@ size_t scan_ldapsearchfilter(const char* src,const char* max,struct Filter** f) res+=len; break; case 9: /* extensibleMatch [9] MatchingRuleAssertion } */ + default: goto error; } return res;