From f726677b9b3a5a384bb96ea4ef7d6f0c4b03524f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 30 Aug 2018 13:14:33 -0400 Subject: [PATCH] Fix: uninitialized data/ret in runas offset commands MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/common/runas.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/runas.c b/src/common/runas.c index 317f68796..debc95926 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -922,6 +922,9 @@ int run_as_extract_elf_symbol_offset(int fd, const char* function, struct run_as_data data; struct run_as_ret ret; + memset(&data, 0, sizeof(data)); + memset(&ret, 0, sizeof(ret)); + DBG3("extract_elf_symbol_offset() on fd=%d and function=%s " "with for uid %d and gid %d", fd, function, (int) uid, (int) gid); @@ -951,6 +954,9 @@ int run_as_extract_sdt_probe_offsets(int fd, const char* provider_name, struct run_as_data data; struct run_as_ret ret; + memset(&data, 0, sizeof(data)); + memset(&ret, 0, sizeof(ret)); + DBG3("extract_sdt_probe_offsets() on fd=%d, probe_name=%s and " "provider_name=%s with for uid %d and gid %d", fd, probe_name, provider_name, (int) uid, (int) gid); -- 2.34.1