From aacf545fa7f1305766f907fdfbcdc1d5ce192746 Mon Sep 17 00:00:00 2001 From: David Korczynski Date: Thu, 16 Jan 2025 04:17:58 -0800 Subject: [PATCH] core: fix calltree bitmap naming Signed-off-by: David Korczynski --- src/fuzz_introspector/datatypes/fuzzer_profile.py | 3 ++- src/fuzz_introspector/html_report.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fuzz_introspector/datatypes/fuzzer_profile.py b/src/fuzz_introspector/datatypes/fuzzer_profile.py index dbd4256f9..69b970354 100644 --- a/src/fuzz_introspector/datatypes/fuzzer_profile.py +++ b/src/fuzz_introspector/datatypes/fuzzer_profile.py @@ -123,7 +123,8 @@ def entrypoint_function(self): def identifier(self): """Fuzzer identifier""" if self._target_lang == "c-cpp": - if self.binary_executable != "": + if self.binary_executable != "" and not os.path.basename( + self.binary_executable) != '': return os.path.basename(self.binary_executable) elif self._target_lang == "python": diff --git a/src/fuzz_introspector/html_report.py b/src/fuzz_introspector/html_report.py index f2734910a..140ec5a4a 100644 --- a/src/fuzz_introspector/html_report.py +++ b/src/fuzz_introspector/html_report.py @@ -398,6 +398,8 @@ def create_fuzzer_detailed_section( colormap_file_prefix = profile.identifier if "/" in colormap_file_prefix: colormap_file_prefix = colormap_file_prefix.replace("/", "_") + if not colormap_file_prefix: + colormap_file_prefix = str(random.randint(0, 99999)) image_name = f"{colormap_file_prefix}_colormap.png" color_list = html_helpers.create_horisontal_calltree_image(