From 01dd639c1c83135ec76cd5639c6974b913f638d1 Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Mon, 22 Aug 2011 22:04:12 +0200 Subject: [PATCH] Fix half-exploit: do not allow 0-byte loadables (padded to 16 bytes for MAC) --- firmware/filesystem/execute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/filesystem/execute.c b/firmware/filesystem/execute.c index 391b071..7546e74 100644 --- a/firmware/filesystem/execute.c +++ b/firmware/filesystem/execute.c @@ -53,7 +53,7 @@ uint8_t execute_file (const char * fname){ data = (uint32_t*)dst; len = readbytes/4; - if( readbytes & 0xF ){ + if( readbytes & 0xF || readbytes <= 0x10){ lcdClear(); lcdPrint("!size"); lcdRefresh();