Re: cube output function can overrun its buffer

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: cube output function can overrun its buffer
Date: 2002-08-18 20:17:17
Message-ID: 3893.1029701837@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bruno Wolff III <bruno(at)wolff(dot)to> writes:
> In cube_out 100 bytes are allocated to hold the output string.

Good point.

> Instead
> using a bound on the size of g format output and separation characters,
> this bound times twice the dimension (possibly plus a small constant for
> parens and terminating 0 byte) should be used.

I made it use an expandable buffer, instead. Much less fragile...

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Ian Grant 2002-08-20 10:54:16 initdb fails on ia64 SMP system
Previous Message Bruno Wolff III 2002-08-18 15:01:09 cube output function can overrun its buffer