pgsql: Fix undersized result buffer in pset_quoted_string().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix undersized result buffer in pset_quoted_string().
Date: 2014-10-26 23:18:04
Message-ID: E1XiX4W-0003Ax-L7@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix undersized result buffer in pset_quoted_string().

The malloc request was 1 byte too small for the worst-case output.
This seems relatively unlikely to cause any problems in practice,
as the worst case only occurs if the input string contains no
characters other than single-quote or newline, and even then
malloc alignment padding would probably save the day. But it's
definitely a bug.

David Rowley

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/c53a82b99d98df393d7ba308bf1586b2201d0d65

Modified Files
--------------
src/bin/psql/command.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-10-27 00:59:28 pgsql: Avoid unportable strftime() behavior in pg_dump/pg_dumpall.
Previous Message Tom Lane 2014-10-26 20:12:51 pgsql: Improve planning of btree index scans using ScalarArrayOpExpr qu