cube output function can overrun its buffer - Mailing list pgsql-bugs

From Bruno Wolff III
Subject cube output function can overrun its buffer
Date
Msg-id 20020818150109.GA7982@wolff.to
Whole thread Raw
Responses Re: cube output function can overrun its buffer  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
In cube_out 100 bytes are allocated to hold the output string. 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.

With this approach you might want to add specific precision specification
in case the default precision in glibc changes in the future.

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: bug in config for cygwin
Next
From: Tom Lane
Date:
Subject: Re: cube output function can overrun its buffer