Skip to content

Commit bd2e228

Browse files
Fix ce-inline crashing when no debuginfo is provided
Previously, if ce-inline were called without providing a debuginfo (elf_path) to it, the program would crash as result of attempting to build a string from nullptr. This is because when elf_path is null, the resulting vector should be empty. Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
1 parent ac81bbb commit bd2e228

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libcextract/InlineAnalysis.hh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ class InlineAnalysis
5454

5555
InlineAnalysis(const char *elf_path, const char *ipaclone_path,
5656
const char *symvers_path, bool is_kernel)
57-
: InlineAnalysis(std::vector<std::string>({elf_path}),
57+
: InlineAnalysis(elf_path == nullptr ?
58+
std::vector<std::string>() :
59+
std::vector<std::string>({elf_path}),
5860
ipaclone_path, symvers_path, is_kernel)
5961
{}
6062

0 commit comments

Comments
 (0)