-
Notifications
You must be signed in to change notification settings - Fork 29
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
365 rework tc status magic #368
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #368 +/- ##
==========================================
- Coverage 84.12% 76.53% -7.59%
==========================================
Files 81 81
Lines 21719 22041 +322
Branches 1757 1777 +20
==========================================
- Hits 18271 16870 -1401
- Misses 2765 4531 +1766
+ Partials 683 640 -43 ☔ View full report in Codecov by Sentry. |
src/core/crypto.c
Outdated
sdls_frame.pdu.hdr.pid = (tc_sdls_processed_frame->tc_pdu[10] & 0x0F); | ||
sdls_frame.pdu.hdr.pdu_len = | ||
(tc_sdls_processed_frame->tc_pdu[11] << 8) | tc_sdls_processed_frame->tc_pdu[12]; | ||
for (uint16_t x = 13; x < (13 + sdls_frame.hdr.pkt_length); x++) |
Check failure
Code scanning / CodeQL
Comparison of narrow type with wide type in loop condition
src/core/crypto.c
Outdated
sdls_frame.pdu.hdr.sg = (tc_sdls_processed_frame->tc_pdu[0] & 0x30) >> 4; | ||
sdls_frame.pdu.hdr.pid = (tc_sdls_processed_frame->tc_pdu[0] & 0x0F); | ||
sdls_frame.pdu.hdr.pdu_len = (tc_sdls_processed_frame->tc_pdu[1] << 8) | tc_sdls_processed_frame->tc_pdu[2]; | ||
for (uint16_t x = 3; x < (3 + tc_sdls_processed_frame->tc_header.fl); x++) |
Check failure
Code scanning / CodeQL
Comparison of narrow type with wide type in loop condition
Do we happen to have a test w/o the PUS header? I know we have the one that caught this initial issue, but did we add another for one that doesn't have one? (Just thinking aloud) |
@rjbrown2 I have tests now with and without PUS header, and some bounds checking. See what ya think |
mc_if->mc_log(status); | ||
status = CRYPTO_LIB_SUCCESS; | ||
} | ||
status = Crypto_Process_Extended_Procedure_Pdu(tc_sdls_processed_frame, ingest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need the SPI_MIN and SPI_MAX check above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Resolves #366 (got the branch number off by one)