Repository navigation
Reject empty hash in tlv_get_hash - #1098
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## develop #1098 +/- ##
============================================
- Coverage 87.61% 74.49% -13.12%
============================================
Files 139 162 +23
Lines 9913 14623 +4710
Branches 1661 3505 +1844
============================================
+ Hits 8685 10893 +2208
- Misses 1029 3489 +2460
- Partials 199 241 +42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Coverage OverviewLanguages: C C / code-coverage/unittestsThe overall coverage in commit 6e5bdea in the Show a code coverage summary of the most covered files.
Updated |
|
elf sizes
Stack consumption summary (clone_app_stack_consumption)
Stack consumption summary
|
a939c61 to
9cec596
Compare
… stack reads Passing min_size=0 to get_buffer_from_tlv_data allowed TLV payloads shorter than the destination buffer to pass validation. memmove would then copy fewer bytes than the buffer size, leaving the remainder uninitialized on the stack, which any subsequent memcmp would read. Fix by passing size as both min and max, enforcing an exact match. Rename the parameter from max_size to size to reflect this stricter contract.
9cec596 to
6e5bdea
Compare
Code coverage reportPer-file coverage
|
Description
Fix to prevent use of uninitialized memory
When hash.size == 0 after TLV extraction, the memmove was skipped but the function still returned true, leaving the caller's output buffer uninitialized. Detected by MemorySanitizer via ClusterFuzzLite in handle_selector.
Changes include