1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

util: readprotobufint uses const argument

This commit is contained in:
Pavol Rusnak 2019-02-10 13:17:25 +01:00
parent 7288d056a1
commit c609d10c3f
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -378,7 +378,7 @@ static void rx_callback(usbd_device *dev, uint8_t ep)
return;
}
// read payload length
uint8_t *p = buf + 10;
const uint8_t *p = buf + 10;
flash_len = readprotobufint(&p);
if (flash_len > FLASH_TOTAL_SIZE + FLASH_META_DESC_LEN - (FLASH_APP_START - FLASH_ORIGIN)) { // firmware is too big
send_msg_failure(dev);