From fd705063bf866fa08e4f1183badb3c6396bb7eff Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 8 Aug 2023 14:15:51 -0700 Subject: [PATCH] libsysprof: defend against empty symbol lists --- src/libsysprof/sysprof-callgraph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libsysprof/sysprof-callgraph.c b/src/libsysprof/sysprof-callgraph.c index 3b4c55a2..c309e1e4 100644 --- a/src/libsysprof/sysprof-callgraph.c +++ b/src/libsysprof/sysprof-callgraph.c @@ -373,6 +373,8 @@ sysprof_callgraph_add_traceable (SysprofCallgraph *self, symbols, stack_depth, &final_context); + if (n_symbols == 0) + return; g_assert (n_symbols <= stack_depth);