Fix: uninitialized data/ret in runas offset commands
[lttng-tools.git] / src / common / runas.c
index 317f687961d014f09b4021c644a75af94b10e941..debc95926e7d04fa7989ca8f62bc2b85e0e8aaf6 100644 (file)
@@ -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);
This page took 0.024328 seconds and 4 git commands to generate.