From 3c0953420deb785a3d7f4341d578133eb6fd641f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 16 Mar 2022 17:39:07 -0400 Subject: [PATCH] Fix: tests: uninitialized lttng_payload MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- tests/unit/test_event_rule.c | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.34.1