From c0b8aa2bf4f138c75b90fc5f182d53c8f9241e1a Mon Sep 17 00:00:00 2001 From: "C. Masloch" Date: Sat, 21 May 2022 15:32:55 +0200 Subject: [PATCH] task: return Invalid format on empty executable (fixes #70) --- kernel/task.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/task.c b/kernel/task.c index bcfafb5..e39a9c4 100644 --- a/kernel/task.c +++ b/kernel/task.c @@ -844,6 +844,8 @@ COUNT DosExec(COUNT mode, exec_blk FAR * ep, BYTE FAR * lp) else if (rc != 0) { rc = DosComLoader(lp, &TempExeBlock, mode, fd); + } else { + rc = DE_INVLDFMT; } DosCloseSft(fd, FALSE);