From: Jérémie Galarneau Date: Wed, 16 Mar 2022 21:39:07 +0000 (-0400) Subject: Fix: tests: uninitialized lttng_payload X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=6610d7be3cca33951bf9992b8089f05877eee022;p=deliverable%2Flttng-tools.git Fix: tests: uninitialized lttng_payload 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 Change-Id: I7645278f18e4a4678fb5ede9523d0cfa8d3aa106 --- diff --git a/tests/unit/test_event_rule.cpp b/tests/unit/test_event_rule.cpp index b8adee769..d0e33a1f8 100644 --- a/tests/unit/test_event_rule.cpp +++ b/tests/unit/test_event_rule.cpp @@ -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) {