Skip to content
Open
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
6 changes: 5 additions & 1 deletion libpromises/fncall.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Rlist *NewExpArgs(EvalContext *ctx, const Policy *policy, const FnCall *fp, cons
return RlistCopy(fp->args);
}

assert(fp != NULL);

const FnCallType *fn = FnCallTypeGet(fp->name);
if (fn == NULL)
{
Expand Down Expand Up @@ -101,7 +103,9 @@ Rlist *NewExpArgs(EvalContext *ctx, const Policy *policy, const FnCall *fp, cons
}
else
{
rval = ExpandPrivateRval(ctx, NULL, NULL, rp->val.item, rp->val.type);
const Bundle *caller_bundle = fp->caller ? PromiseGetBundle(fp->caller) : NULL;
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
const char *caller_ns = caller_bundle ? caller_bundle->ns : NULL;
rval = ExpandPrivateRval(ctx, caller_ns, NULL, rp->val.item, rp->val.type);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is scope / bundle NULL here? If that is indeed correct, it deserves a comment.

assert(rval.item);
}

Expand Down
Loading