pgsql: Prevent segfault in expand_tuple with no missing values

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Prevent segfault in expand_tuple with no missing values
Date: 2018-04-13 20:49:45
Message-ID: E1f75dh-0001Dt-0j@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7c44c46deb495a2f3861f402d7f2109263e3d50a

Modified Files
--------------
src/backend/access/common/heaptuple.c | 2 +-
src/test/regress/expected/fast_default.out | 35 ++++++++++++++++++++++++++++++
src/test/regress/sql/fast_default.sql | 14 ++++++++++++
3 files changed, 50 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2018-04-14 13:28:36 pgsql: Support named and default arguments in CALL
Previous Message Tom Lane 2018-04-13 17:49:58 pgsql: Improve regression test coverage for src/backend/tsearch/spell.c