From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix NULL handling in datum_to_jsonb().
Date: Thu, 15 Oct 2015 17:46:17 +0000
Message-ID: <E1ZmmbZ-0006Ma-9N@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Fix NULL handling in datum_to_jsonb().
The function failed to adhere to its specification that the "tcategory"
argument should not be examined when the input value is NULL. This
resulted in a crash in some cases. Per bug #13680 from Boyko Yordanov.
In passing, re-pgindent some recent changes in jsonb.c, and fix a rather
ungrammatical comment.
Diagnosis and patch by Michael Paquier, cosmetic changes by me
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/a93b3782e3358cbb1ad8d65386a2e1478b805649
Modified Files
--------------
src/backend/utils/adt/jsonb.c | 27 +++++++++++++++------------
src/test/regress/expected/jsonb.out | 9 +++++++++
src/test/regress/sql/jsonb.sql | 4 ++++
3 files changed, 28 insertions(+), 12 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Fix NULL handling in datum_to_jsonb().
In-Reply-To: <E1ZmmbZ-0006Ma-9N@gemulon.postgresql.org>
References: <E1ZmmbZ-0006Ma-9N@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox