Fix: event-expr-to-bytecode: use after free in logging on error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 9 Mar 2021 21:39:11 +0000 (16:39 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 9 Mar 2021 21:39:11 +0000 (16:39 -0500)
1448709 Use after free

This could cause an immediate crash or incorrect values might be read
subsequently resulting in incorrect computations.

In event_expr_to_bytecode_recursive: A pointer to freed memory is
dereferenced, used as a function argument, or otherwise used (CWE-416)

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

src/common/event-expr-to-bytecode.c

index abc713fb3dba1227f1e914834602219570c2caca..9fe3c0350a1f11674e593b878e5518e1fc49c34e 100644 (file)
@@ -114,7 +114,8 @@ int event_expr_to_bytecode_recursive(const struct lttng_event_expr *expr,
                                bytecode, bytecode_reloc, name);
                free(name);
                if (status) {
-                       ERR("Failed to push 'get symbol %s' in bytecode", name);
+                       ERR("Failed to push 'get symbol %s:%s' in bytecode",
+                                       provider_name, type_name);
                        goto end;
                }
 
This page took 0.025647 seconds and 4 git commands to generate.