Content-Length: 260622 | pFad | http://github.com/postgrespro/postgres/commit/49ad32d5d99cb4a79bf648c0b7f9eca19b54cf1d

7A Fix recently-introduced crash in array_contain_compare(). · postgrespro/postgres@49ad32d · GitHub
Skip to content

Commit 49ad32d

Browse files
committed
Fix recently-introduced crash in array_contain_compare().
Silly oversight in commit 1dc5ebc: when array2 is an expanded array, it might have array2->xpn.dnulls equal to NULL, indicating the array is known null-free. The code wasn't expecting that, because it formerly always used deconstruct_array() which always delivers a nulls array. Per bug #13334 from Regina Obe.
1 parent 5302760 commit 49ad32d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/arrayfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4110,7 +4110,7 @@ array_contain_compare(AnyArrayType *array1, AnyArrayType *array2, Oid collation,
41104110
for (j = 0; j < nelems2; j++)
41114111
{
41124112
Datum elt2 = values2[j];
4113-
bool isnull2 = nulls2[j];
4113+
bool isnull2 = nulls2 ? nulls2[j] : false;
41144114
bool oprresult;
41154115

41164116
if (isnull2)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/49ad32d5d99cb4a79bf648c0b7f9eca19b54cf1d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy