Fix: tests: uninitialized lttng_payload
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Mar 2022 21:39:07 +0000 (17:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Mar 2022 21:39:11 +0000 (17:39 -0400)
1474980 Uninitialized pointer read
Incorrect values could be read from, or even written to, an arbitrary memory location, causing incorrect computations.

In test_event_rule_userspace_probe(): Reads an uninitialized pointer or its target (CWE-457)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I7645278f18e4a4678fb5ede9523d0cfa8d3aa106

tests/unit/test_event_rule.cpp

index b8adee76906b1256b77a7a9d29c812e83c110689..d0e33a1f8d1a11db7de06cc4e9409cfbc35ab581 100644 (file)
@@ -459,6 +459,7 @@ static void test_event_rule_userspace_probe(void)
        struct lttng_payload payload;
 
        diag("Event rule uprobe.");
+       lttng_payload_init(&payload);
 
        lookup_method = lttng_userspace_probe_location_lookup_method_function_elf_create();
        if (!lookup_method) {
This page took 0.027114 seconds and 5 git commands to generate.