mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
Prevent segfault in expand_tuple with no missing values
Commit 16828d5c
forgot to check that it had a set of missing values
before trying to retrieve a value from it.
An additional query to add coverage for this code is added to the
regression test.
Per bug report from Andreas Seltenreich.
This commit is contained in:
@ -981,7 +981,7 @@ expand_tuple(HeapTuple *targetHeapTuple,
|
||||
|
||||
Form_pg_attribute attr = TupleDescAttr(tupleDesc, attnum);
|
||||
|
||||
if (attrmiss[attnum].ammissingPresent)
|
||||
if (attrmiss && attrmiss[attnum].ammissingPresent)
|
||||
{
|
||||
fill_val(attr,
|
||||
nullBits ? &nullBits : NULL,
|
||||
|
Reference in New Issue
Block a user