mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-04-11 02:09:23 -04:00
Avoid the following repeated computing or replay attack.
This commit is contained in:
parent
df7a26c28c
commit
6d9da043da
@ -175,7 +175,7 @@ int main()
|
||||
case FW_CMD_LOAD_APP_DATA:
|
||||
puts("request: load-app-data\n");
|
||||
|
||||
if (hdr.len != 128 || *app_size == 0) {
|
||||
if (hdr.len != 128 || *app_size == 0 || left == 0) {
|
||||
// Bad length of this command or bad app size -
|
||||
// they need to call FW_CMD_LOAD_APP_SIZE first
|
||||
rsp[0] = STATUS_BAD;
|
||||
|
Loading…
x
Reference in New Issue
Block a user