diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-11-19 03:00:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-11-19 03:00:09 +0000 |
commit | 8ef289dba12f16f3692c235863a887672499a5d9 (patch) | |
tree | 819abde06463716dbbf505c444a69ec6858efe6a /contrib/intarray/_int_bool.c | |
parent | 25c00833cb694bea1c4fb3caeccbc9a1fb72d6f8 (diff) | |
download | postgresql-8ef289dba12f16f3692c235863a887672499a5d9.tar.gz postgresql-8ef289dba12f16f3692c235863a887672499a5d9.zip |
Defend against nulls-in-arrays in contrib/intarray. I may have put in
more tests than strictly necessary, but did not feel like tracing call
paths in detail ...
Diffstat (limited to 'contrib/intarray/_int_bool.c')
-rw-r--r-- | contrib/intarray/_int_bool.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c index 824dc5b6775..8e0b913c013 100644 --- a/contrib/intarray/_int_bool.c +++ b/contrib/intarray/_int_bool.c @@ -309,6 +309,7 @@ execconsistent(QUERYTYPE * query, ArrayType *array, bool calcnot) { CHKVAL chkval; + CHECKARRVALID(array); chkval.arrb = ARRPTR(array); chkval.arre = chkval.arrb + ARRNELEMS(array); return execute( @@ -339,6 +340,7 @@ boolop(PG_FUNCTION_ARGS) CHKVAL chkval; bool result; + CHECKARRVALID(val); if (ARRISVOID(val)) { pfree(val); |