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

Warnint 64to32 6186 v19.6 #11257

Closed

Conversation

catenacyber
Copy link
Contributor

[Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/6186

Describe changes:

  • fix -Wshorten-64-to-32 warnings for some files (a*)

First commit of #9840
#11247 with review taken into account

Ticket: 6186

Warnings about downcast from 64 to 32 bits

Generic fixes required to get app-layer clean
Ticket: OISF#6186

Warnings about downcast from 64 to 32 bits
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 81.52174% with 17 lines in your changes missing coverage. Please review.

Project coverage is 82.98%. Comparing base (8781e93) to head (429b7fe).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11257      +/-   ##
==========================================
- Coverage   82.99%   82.98%   -0.01%     
==========================================
  Files         942      942              
  Lines      249358   249384      +26     
==========================================
+ Hits       206951   206958       +7     
- Misses      42407    42426      +19     
Flag Coverage Δ
fuzzcorpus 61.09% <80.43%> (-0.02%) ⬇️
livemode 18.79% <4.34%> (-0.05%) ⬇️
pcap 44.30% <71.73%> (-0.02%) ⬇️
suricata-verify 61.69% <78.26%> (+0.01%) ⬆️
unittests 60.50% <35.86%> (-0.01%) ⬇️

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

c->container->lastsize = f->size;
HttpRangeFileClose(sbcfg, c->container, flags | FILE_TRUNCATED);
c->container->error = true;
return f;
}
}
if (FileAppendData(c->container->files, sbcfg, range->buffer, range->offset) != 0) {
if (range->offset > UINT32_MAX) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean we can't support ranges for files > 4GiB?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that means we do not support ranges >4GiB for files

For example, We support a 15 GiB file if it is split into 15 1GiB ranges (but util-file.c has the DEBUG_VALIDATE_BUG_ON(data_len > BIT_U32(26)); // 64MiB as a limit per chunk seems already excessive in this case)
We do not support this 15 GiB file if it is split into 3 5GiB files, because FileAppendData only accepts a u32

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this seems like something we need to fix, but that can be in another effort

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 21008

@victorjulien victorjulien added this to the 8.0 milestone Jun 21, 2024
@victorjulien
Copy link
Member

Merged in #11353, 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