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

var: Use 16-bit container for type #12281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jlucovsky
Copy link
Contributor

Continuation of #12272

Issue: 6855: Match sigmatch type field in var and bit structs

Align the size and datatype of type, idx, and next members across:

  • FlowVarThreshold
  • FlowBit
  • FlowVar
  • GenericVar
  • XBit

Note that the FlowVar structure has been intentionally constrained to match the structure size prior to this commit. To achieve this, the keylen member was restricted to 8 bits after it was confirmed its value is checked against a max of 0xff.
Link to ticket: https://redmine.openinfosecfoundation.org/issues/6855

Describe changes:

  • Increase type in flowbit, flowvar and generic var
  • Ensure type, idx, and next pointers align on each struct.

Updates:

  • Decreased FlowVar size to match master

Provide values to any of the below to override the defaults.

  • To use an LibHTP, Suricata-Verify or Suricata-Update pull request,
    link to the pull request in the respective _BRANCH variable.
  • Leave unused overrides blank or remove.

SV_REPO=
SV_BRANCH=
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=

Issue: 6855: Match sigmatch type field in var and bit structs

Align the size and datatype of type, idx, and next members across:
- FlowVarThreshold
- FlowBit
- FlowVar
- GenericVar
- XBit

Note that the FlowVar structure has been intentionally constrained to
match the structure size prior to this commit. To achieve this, the
keylen member was restricted to 8 bits after it was confirmed its value
is checked against a max of 0xff.
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 83.23%. Comparing base (0e4faba) to head (dd93761).
Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12281      +/-   ##
==========================================
+ Coverage   83.22%   83.23%   +0.01%     
==========================================
  Files         912      912              
  Lines      257311   257627     +316     
==========================================
+ Hits       214154   214443     +289     
- Misses      43157    43184      +27     
Flag Coverage Δ
fuzzcorpus 61.08% <0.00%> (+0.01%) ⬆️
livemode 19.40% <0.00%> (-0.13%) ⬇️
pcap 44.04% <0.00%> (-0.33%) ⬇️
suricata-verify 62.89% <0.00%> (+0.04%) ⬆️
unittests 59.18% <0.00%> (-0.01%) ⬇️

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

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 23954

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.

2 participants