Re: pset_quoted_string is broken

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pset_quoted_string is broken
Date: 2014-10-26 23:20:14
Message-ID: 15760.1414365614@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <dgrowleyml(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2014-10-26 23:56:20 Re: pg_dump/pg_restore seem broken on hamerkop
Previous Message Tatsuo Ishii 2014-10-26 22:56:33 Re: pg_dump/pg_restore seem broken on hamerkop