mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-26 12:05:59 +00:00
Merge pull request #1439 from ivanstepanovftw/fix-dwarf-npd
fix #1438 null dereference in dwarf
This commit is contained in:
@@ -4153,7 +4153,7 @@ report_inlined_functions (uintptr_t pc, struct function *function, const char* c
|
||||
return ret;
|
||||
|
||||
/* Report this inlined call. */
|
||||
if (*filename[0] != '/' && comp_dir)
|
||||
if (*filename && *filename[0] != '/' && comp_dir)
|
||||
{
|
||||
char buf[1024];
|
||||
snprintf (buf, 1024, "%s/%s", comp_dir, *filename);
|
||||
@@ -4434,7 +4434,7 @@ dwarf_lookup_pc (struct backtrace_state *state, struct dwarf_data *ddata,
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
if (filename[0] != '/' && entry->u->comp_dir)
|
||||
if (filename && filename[0] != '/' && entry->u->comp_dir)
|
||||
{
|
||||
char buf[1024];
|
||||
snprintf (buf, 1024, "%s/%s", entry->u->comp_dir, filename);
|
||||
|
||||
Reference in New Issue
Block a user