From 200015d5149d01cd3b8c152be1e2f780e591ed1e Mon Sep 17 00:00:00 2001 From: chao an Date: Thu, 12 Dec 2024 22:26:16 +0800 Subject: [PATCH] binfmt/exec: initialize binary_s to empty to avoid invaild access Signed-off-by: chao an --- binfmt/binfmt_exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/binfmt/binfmt_exec.c b/binfmt/binfmt_exec.c index 6ffc535a3f..e58d0ad891 100644 --- a/binfmt/binfmt_exec.c +++ b/binfmt/binfmt_exec.c @@ -88,6 +88,7 @@ static int exec_internal(FAR const char *filename, struct binary_s sbin; bin = &sbin; + memset(bin, 0, sizeof(*bin)); #else /* Allocate the load information */