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
This commit is contained in:
Noah Misch 2015-12-05 03:04:17 -05:00
parent 63acfb79ab
commit d4b686af0b

View File

@ -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++)
{ {