Skip to content

detect: guard rate filter callback registration, return bool on failure - #15586

Closed
kenifor wants to merge 2 commits into
OISF:mainfrom
kenifor:fix-rate-filter-callback-v3
Closed

detect: guard rate filter callback registration, return bool on failure#15586
kenifor wants to merge 2 commits into
OISF:mainfrom
kenifor:fix-rate-filter-callback-v3

Conversation

@kenifor

@kenifor kenifor commented Jun 9, 2026

Copy link
Copy Markdown

Supersedes #15558. Restored bool return; examples now check the return value and warn on failure.

Denis Balashov added 2 commits June 9, 2026 11:33
SCDetectEngineRegisterRateFilterCallback() dereferences the result of
DetectEngineGetCurrent() unconditionally. Add a NULL guard with
SCLogError and return false so callers can detect registration failure.

Flagged by Svace and confirmed by gcc -fanalyzer.

Ticket: 8560
Check DetectEngineEnabled() before registering, and warn if the
registration call returns false.
@kenifor
kenifor requested review from a team and victorjulien as code owners June 9, 2026 08:33
@victorjulien victorjulien added this to the 9.0 milestone Jun 9, 2026
@victorjulien

Copy link
Copy Markdown
Member

Merged in #15601, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants