Re: pset_quoted_string is broken - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pset_quoted_string is broken
Date
Msg-id 15760.1414365614@sss.pgh.pa.us
Whole thread Raw
In response to pset_quoted_string is broken  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: pset_quoted_string is broken
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> It seems the buffer created in pset_quoted_string is just 1 char too small.

Yeah, that's a bug.  Fix pushed, thanks!

> This breaks psql's \pset for me, though I've no idea why the buildfarm is
> not complaining a bit more.

I think in most cases, maxalign padding of the malloc allocation would
result in there being room for another byte without trashing anything
important.  You must be using a libc that notices and complains about
even 1-byte buffer overruns.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: pg_dump/pg_restore seem broken on hamerkop
Next
From: Alvaro Herrera
Date:
Subject: Re: pg_dump/pg_restore seem broken on hamerkop