pgsql: Fix bogus handling of control characters in json_lex_string(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix bogus handling of control characters in json_lex_string().
Date
Msg-id E1SbhsR-0005dY-Op@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix bogus handling of control characters in json_lex_string().

The original coding misbehaved if "char" is signed, and also made the
extremely poor decision to print control characters literally when trying
to complain about them.  Report and patch by Shigeru Hanada.

In passing, also fix core dump risk in report_parse_error() should the
parse state be something other than what it expects.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3dd8e596812e3adb72aecafb23fbb6a30836c475

Modified Files
--------------
src/backend/utils/adt/json.c       |    8 ++++----
src/test/regress/expected/json.out |    3 +--
2 files changed, 5 insertions(+), 6 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix some more bugs in contrib/xml2's xslt_process().
Next
From: Magnus Hagander
Date:
Subject: Re: pgsql: pg_basebackup: Error message improvements.