mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-26 01:42:34 +00:00
util: readprotobufint uses const argument
This commit is contained in:
parent
7288d056a1
commit
c609d10c3f
@ -378,7 +378,7 @@ static void rx_callback(usbd_device *dev, uint8_t ep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// read payload length
|
// read payload length
|
||||||
uint8_t *p = buf + 10;
|
const uint8_t *p = buf + 10;
|
||||||
flash_len = readprotobufint(&p);
|
flash_len = readprotobufint(&p);
|
||||||
if (flash_len > FLASH_TOTAL_SIZE + FLASH_META_DESC_LEN - (FLASH_APP_START - FLASH_ORIGIN)) { // firmware is too big
|
if (flash_len > FLASH_TOTAL_SIZE + FLASH_META_DESC_LEN - (FLASH_APP_START - FLASH_ORIGIN)) { // firmware is too big
|
||||||
send_msg_failure(dev);
|
send_msg_failure(dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user