pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix NULL handling in datum_to_jsonb().
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix NULL handling in datum_to_jsonb().
@ 2015-10-15 17:46  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-10-15 17:46 UTC (permalink / raw)
  To: pgsql-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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix NULL handling in datum_to_jsonb().
@ 2015-10-15 17:46  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2015-10-15 17:46 UTC (permalink / raw)
  To: pgsql-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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3587cbc34fe87e1bde6c202daba791b68e44cb3a

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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-10-15 17:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-15 17:46 pgsql: Fix NULL handling in datum_to_jsonb(). Tom Lane <tgl@sss.pgh.pa.us>
2015-10-15 17:46 pgsql: Fix NULL handling in datum_to_jsonb(). Tom Lane <tgl@sss.pgh.pa.us>

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