Skip to content

fix segmentfault when exec dtagnames or prefcnt without any args #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions btf_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,9 @@ static int cus__load_btf(struct cus *cus, struct conf_load *conf, const char *fi
{
int err = -1;

if (conf == NULL)
return -1;

// Pass a zero for addr_size, we'll get it after we load via btf__pointer_size()
struct cu *cu = cu__new(filename, 0, NULL, 0, filename, false);
if (cu == NULL)
Expand Down
3 changes: 3 additions & 0 deletions dwarf_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -3315,6 +3315,9 @@ static int dwarf__load_file(struct cus *cus, struct conf_load *conf,
{
int fd, err;

if (conf == NULL)
return -1;

if (conf->max_hashtable_bits != 0) {
if (conf->max_hashtable_bits > 31)
return -E2BIG;
Expand Down