diff options
author | Noah Misch <noah@leadboat.com> | 2015-12-05 03:04:17 -0500 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2015-12-05 03:04:30 -0500 |
commit | 0d46bdde2b59e67446e10165e487935a54dfd225 (patch) | |
tree | 66c4b37c18d3a47f8db91e49a28d78b559724fcd /src/pl/plperl/plperl.c | |
parent | d3762fe6c208c4f5e66db24a10ddc549e9e08e0f (diff) | |
download | postgresql-0d46bdde2b59e67446e10165e487935a54dfd225.tar.gz postgresql-0d46bdde2b59e67446e10165e487935a54dfd225.zip |
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
Diffstat (limited to 'src/pl/plperl/plperl.c')
-rw-r--r-- | src/pl/plperl/plperl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 549034f7640..300feb018f9 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -2111,8 +2111,10 @@ plperl_call_perl_func(plperl_proc_desc *desc, FunctionCallInfo fcinfo) PUSHMARK(SP); EXTEND(sp, desc->nargs); + /* Get signature for true functions; inline blocks have no args. */ if (fcinfo->flinfo->fn_oid) get_func_signature(fcinfo->flinfo->fn_oid, &argtypes, &nargs); + Assert(nargs == desc->nargs); for (i = 0; i < desc->nargs; i++) { |