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:
@ -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);
|
||||
|
Reference in New Issue
Block a user