fix(tlv): enforce exact size in tlv_get_hash to prevent uninitialized 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. (cherry picked from commit 6e5bdea1f44883df2d57a9e006c6588c4849bf97)
C
Charles-Edouard de la Vergne committed
55ad56ef6efc8ba454a63f5eb07c9680e602af52
Parent: fa223df
Committed by Alexandre Paillier <alexandre.paillier@ledger.fr>
on 8/25/2026, 3:04:02 PM