Project

General

Profile

Actions

Optimization #8504

closed
SP SP

detect-engine-analyzer: remove unnecessary check

Optimization #8504: detect-engine-analyzer: remove unnecessary check

Added by Sergey Pinaev 28 days ago. Updated about 5 hours ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

in EngineAnalysisRules2() there is:
if (smd NULL && mpm_list DETECT_SM_LIST_PMATCH) {
smd = s->sm_arrays[mpm_list];
}
do {
switch (smd->type) {
this should be replaced with something like:
if (smd == NULL) {
DEBUG_VALIDATE_BUG_ON(mpm_list != DETECT_SM_LIST_PMATCH);
smd = s->sm_arrays[mpm_list];
}
do {
switch (smd->type) {
because if smd is NULL but mpm_list != DETECT_SM_LIST_PMATCH there will be null pointer
dereference at switch (smd->type).

PA Updated by Philippe Antoine 26 days ago Actions #2

  • Status changed from New to In Review
  • Assignee set to Sergey Pinaev

PA Updated by Philippe Antoine 18 days ago Actions #4

  • Target version changed from TBD to 9.0.0-beta1

PA Updated by Philippe Antoine about 5 hours ago Actions #5

  • Status changed from In Review to Closed
Actions

Also available in: PDF Atom