File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -454,22 +454,14 @@ void SigParseRequiredContentSize(
454
454
bool DetectContentPMATCHValidateCallback (const Signature * s )
455
455
{
456
456
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
457
- bool has_pcre = false;
458
- bool has_content = false;
459
457
for (SigMatch * sm = s -> init_data -> smlists [DETECT_SM_LIST_PMATCH ]; sm != NULL ; sm = sm -> next ) {
460
458
if (sm -> type == DETECT_PCRE ) {
461
- has_pcre = true;
462
- } else if ( sm -> type == DETECT_CONTENT ) {
463
- has_content = true;
464
- break ;
459
+ // Fuzzing does not allow rules with pcre on payload
460
+ // as it is known to be a bad rule for performance causing possible timeouts
461
+ // Engine analysis has more generic warn_pcre_no_content about this
462
+ return false ;
465
463
}
466
464
}
467
- if (has_pcre && !has_content ) {
468
- // Fuzzing does not allow rules with pcre and without content on payload
469
- // as it is known to be a bad rule for performance causing possible timeouts
470
- // Engine analysis has more generic warn_pcre_no_content about this
471
- return false;
472
- }
473
465
#endif
474
466
475
467
if (!(s -> flags & SIG_FLAG_DSIZE )) {
You can’t perform that action at this time.
0 commit comments