mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-27 01:48:17 +00:00
nem: check length in layoutNEMTransferPayload
This commit is contained in:
parent
1f470cf1f1
commit
0ae5e91fcb
@ -759,7 +759,7 @@ void layoutNEMTransferUnknownMosaic(const char *namespace, const char *mosaic, u
|
||||
}
|
||||
|
||||
void layoutNEMTransferPayload(const uint8_t *payload, size_t length, bool encrypted) {
|
||||
if (payload[0] == 0xFE) {
|
||||
if (length >= 1 && payload[0] == 0xFE) {
|
||||
char encoded[(length - 1) * 2 + 1];
|
||||
data2hex(&payload[1], length - 1, encoded);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user