bristlemouth / bm_protocol

Primary Bristlemouth firmware repository
https://www.bristlemouth.org/
Apache License 2.0
10 stars 7 forks source link

Bug/bridge mem leak #58

Closed victorsowa12 closed 9 months ago

victorsowa12 commented 9 months ago

Fixes heap corruption bug with the bridges reportBuilder. When backfilling for an element that was not part of the report builder yet the element->sample_counter was erroneously incremented in a memcpy statement, thus putting the last element beyond the allocated buffer into unallocated heap. So I removed the erroneous increment. In addition, I increased the report builders max cbor buffer size to allow for up-to a max samples in bit-packed message(26 samples).