Commit d4b686af authored by Noah Misch's avatar Noah Misch

Instruct Coverity using an assertion.

This should make Coverity deduce that plperl_call_perl_func() does not
dereference NULL argtypes.  Back-patch to 9.5, where the affected code
was introduced.

Michael Paquier
parent 63acfb79
...@@ -2111,8 +2111,10 @@ plperl_call_perl_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo) ...@@ -2111,8 +2111,10 @@ plperl_call_perl_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo)
PUSHMARK(SP); PUSHMARK(SP);
EXTEND(sp, desc->nargs); EXTEND(sp, desc->nargs);
/* Get signature for true functions; inline blocks have no args. */
if (fcinfo->flinfo->fn_oid) if (fcinfo->flinfo->fn_oid)
get_func_signature(fcinfo->flinfo->fn_oid, &argtypes, &nargs); get_func_signature(fcinfo->flinfo->fn_oid, &argtypes, &nargs);
Assert(nargs == desc->nargs);
for (i = 0; i < desc->nargs; i++) for (i = 0; i < desc->nargs; i++)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment