From: Jérémie Galarneau Date: Wed, 16 Mar 2022 21:39:07 +0000 (-0400) Subject: Fix: tests: uninitialized lttng_payload X-Git-Tag: v2.13.5~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3c0953420deb785a3d7f4341d578133eb6fd641f;p=lttng-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.c b/tests/unit/test_event_rule.c index f2514e158..6ca94e95e 100644 --- a/tests/unit/test_event_rule.c +++ b/tests/unit/test_event_rule.c @@ -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) {