]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix a passel of ancient bugs in to_char(), including two distinct buffer
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Jun 2007 01:52:04 +0000 (01:52 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 29 Jun 2007 01:52:04 +0000 (01:52 +0000)
commit2f5c37e94ae85cab84419f43795945edbabae967
tree9935af9f4545e399e031a1c6c2cf808bd226a87e
parent71db4c703f5ddfa751ce43b915c22e01aeaeaa08
Fix a passel of ancient bugs in to_char(), including two distinct buffer
overruns (neither of which seem likely to be exploitable as security holes,
fortunately, since the provoker can't control the data written).  One of
these is due to choosing to stomp on the output of a called function, which
is bad news in any case; make it treat the called functions' results as
read-only.  Avoid some unnecessary palloc/pfree traffic too; it's not
really helpful to free small temporary objects, and again this is presuming
more than it ought to about the nature of the results of called functions.
Per report from Patrick Welche and additional code-reading by Imad.
src/backend/utils/adt/formatting.c