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 v23.2 #11705

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 : output, stream

Some commits of #9840
#11580 next batch
#11700 with code review taken into account

Still to do afterwards :

  • detect
  • util

Victor, I let you review the stream stuff ;-)

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 85.93750% with 9 lines in your changes missing coverage. Please review.

Project coverage is 82.63%. Comparing base (685baa9) to head (9ca2f67).
Report is 77 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11705      +/-   ##
==========================================
- Coverage   82.63%   82.63%   -0.01%     
==========================================
  Files         919      919              
  Lines      248925   248913      -12     
==========================================
- Hits       205703   205684      -19     
- Misses      43222    43229       +7     
Flag Coverage Δ
fuzzcorpus 60.88% <78.12%> (+<0.01%) ⬆️
livemode 18.75% <7.81%> (+0.03%) ⬆️
pcap 44.10% <54.68%> (-0.05%) ⬇️
suricata-verify 61.85% <82.81%> (-0.03%) ⬇️
unittests 59.01% <14.06%> (+<0.01%) ⬆️

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

@suricata-qa
Copy link

ERROR:

ERROR: QA failed on SURI_TLPR1_alerts_cmp.

Pipeline 22390

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 22430

@victorjulien victorjulien self-assigned this Oct 4, 2024
Copy link
Member

@victorjulien victorjulien left a comment

Choose a reason for hiding this comment

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

Thanks for this cleanup. I have a few comments inline.

@@ -294,19 +295,12 @@ static void EveHttpLogJSONExtended(JsonBuilder *js, htp_tx_t *tx)
const int resp = tx->response_status_number;
if (resp > 0) {
jb_set_uint(js, "status", (uint32_t)resp);
} else if (tx->response_status != NULL) {
Copy link
Member

Choose a reason for hiding this comment

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

This belongs in it's own commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -1107,9 +1107,9 @@ static bool GetAppBuffer(const TcpStream *stream, const uint8_t **data, uint32_t
"got data at %"PRIu64". GAP of size %"PRIu64,
offset, blk->offset, blk->offset - offset);
*data = NULL;
*data_len = blk->offset - offset;
*data_len = (uint32_t)(blk->offset - offset);
Copy link
Member

Choose a reason for hiding this comment

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

not actually sure if we can't get a gap > 4GiB... It seems unlikely for sure. I guess we'd get all confused anyway due to sequence number wrapping around.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How could we tell that the GAP is over 4Gbytes with TCP ?

I guess we'd get all confused anyway due to sequence number wrapping around.

Indeed

@catenacyber
Copy link
Contributor Author

Next in #11904

@catenacyber catenacyber closed this Oct 8, 2024
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