]> granicus.if.org Git - postgresql/commit
Fix undersized result buffer in pset_quoted_string().
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 26 Oct 2014 23:17:57 +0000 (19:17 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 26 Oct 2014 23:17:57 +0000 (19:17 -0400)
commitc53a82b99d98df393d7ba308bf1586b2201d0d65
tree68295b3ee99cd9ec4221f21d2156f824d6cd2d3e
parent859e2b9dd4de94ef9a9ad34da3e39572e4f1d66f
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
src/bin/psql/command.c