fw: Don't allow an app size of 0

This commit is contained in:
Michael Cardell Widerkrantz 2022-11-03 12:23:40 +01:00
parent 632e21886d
commit 60b2dcfbb9
No known key found for this signature in database
GPG Key ID: D3DB3DDF57E704E5

View File

@ -245,7 +245,8 @@ int main()
putinthex(local_app_size);
lf();
if (local_app_size > TK1_APP_MAX_SIZE) {
if (local_app_size == 0 ||
local_app_size > TK1_APP_MAX_SIZE) {
rsp[0] = STATUS_BAD;
fwreply(hdr, FW_RSP_LOAD_APP, rsp);
break;