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>
Thu, 17 Mar 2022 17:36:01 +0000 (13:36 -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.c

index f2514e158a5c956060e6663bc3558077aca3d69f..6ca94e95e840016d4fed788ba342683265c189f7 100644 (file)
@@ -460,6 +460,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.027627 seconds and 4 git commands to generate.