1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

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 ...
This commit is contained in:
Tom Lane
2005-11-19 03:00:09 +00:00
parent 25c00833cb
commit 8ef289dba1
6 changed files with 131 additions and 44 deletions

View File

@ -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);