diff --git a/exec.c b/exec.c index 6be6af1bc4..4d7d97cc8f 100644 --- a/exec.c +++ b/exec.c @@ -28,7 +28,7 @@ exec(char *path, char **argv) pgdir = 0; // Check ELF header - if(readi(ip, (char*)&elf, 0, sizeof(elf)) < sizeof(elf)) + if(readi(ip, (char*)&elf, 0, sizeof(elf)) != sizeof(elf)) goto bad; if(elf.magic != ELF_MAGIC) goto bad;