Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next/142/20231005/v1 #9555

Closed
wants to merge 2 commits into from

Conversation

victorjulien
Copy link
Member

catenacyber and others added 2 commits October 5, 2023 06:28
email_ctx->fields only gets populated when smtp.custom setting is on.
The fn EveEmailLogJSONCustom is called when either
1. smtp.extended setting is on or,
2. email_ctx->fields is populated which means smtp.custom setting is on

In case neither of these are set in suricata.yaml, no call should
ideally be made to the fn EveEmailLogJSONCustom.
However, it turns out that email_ctx->fields is unset and then set only
after the smtp config was found. This leads to email_ctx->fields
sometimes contain value even when no config was given to the smtp
section and can lead to unexpected output.

Fix this by using SCCalloc while initializing OutputJsonEmailCtx struct
instead of SCMalloc.

Bug 6380
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

Merging #9555 (d972462) into master (9157070) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9555      +/-   ##
==========================================
- Coverage   82.20%   82.19%   -0.02%     
==========================================
  Files         968      968              
  Lines      274275   274275              
==========================================
- Hits       225461   225430      -31     
- Misses      48814    48845      +31     
Flag Coverage Δ
fuzzcorpus 64.05% <100.00%> (+<0.01%) ⬆️
suricata-verify 60.93% <100.00%> (-0.03%) ⬇️
unittests 62.87% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@victorjulien
Copy link
Member Author

Replaced by #9570

@victorjulien victorjulien deleted the next/142/20231005/v1 branch June 23, 2024 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants