postgres.git / summary / log / commit / refs
commit d4b686af0b8ff2d2557b4fec7e5938abb9249167
Author: Noah Misch <noah@leadboat.com>
Date: Sat Dec 05 08:04:17 2015 +0000
First released in: 9.6.0, 9.5.0
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
src/pl/plperl/plperl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index 87dc6f0c3ba..b35ef3f64bc 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++)
{
[parent: 63acfb79ab53]