Actions
Optimization #8504
open
SP
detect-engine-analyzer: remove unnecessary check
Optimization #8504:
detect-engine-analyzer: remove unnecessary check
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).
SP Updated by Sergey Pinaev 1 day ago
Actions