pgsql: Fix undersized result buffer in pset_quoted_string(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix undersized result buffer in pset_quoted_string().
Date
Msg-id E1XiX4W-0003Aw-L2@gemulon.postgresql.org
Whole thread Raw
List 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9711fa06081da230e62fa52147c49ccf7b9ccbe2

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


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix undersized result buffer in pset_quoted_string().
Next
From: Tom Lane
Date:
Subject: pgsql: Avoid unportable strftime() behavior in pg_dump/pg_dumpall.