diff --git a/kernel/src/binfmt/Script.cpp b/kernel/src/binfmt/Script.cpp index fe56af83..acf5f6c2 100644 --- a/kernel/src/binfmt/Script.cpp +++ b/kernel/src/binfmt/Script.cpp @@ -16,6 +16,8 @@ Result ScriptLoader::sniff() Result ScriptLoader::load(AddressSpace* space) { u8 buf[256]; + memset(buf, 0, sizeof(buf)); + usize nread = TRY(m_inode->read(buf, 2, 255)); if (!nread) return err(ENOEXEC); for (usize i = 0; i < nread; i++)