Legacy: cryptoMultisigFingerprint
magically relies on certain fields being u32-sized
#4547
Labels
code
Code improvements
the following piece of code casts multiple values to a
(const uint8_t*)
and hashessizeof(uint32_t)
bytes starting at that pointer into that fingerprint.trezor-firmware/legacy/firmware/crypto.c
Lines 418 to 432 in 96ac4e2
while unlikely, if we change the data type for any of the fields, the code will become undetectably incorrect. This has already caused a bug in #4396 via
-fshort-enums
.we should convert this code to use actual sizes of the fields / data types, instead of assuming uint32
The text was updated successfully, but these errors were encountered: