• Tom Lane's avatar
    Fix a passel of ancient bugs in to_char(), including two distinct buffer · 6faf7956
    Tom Lane authored
    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.
    6faf7956
formatting.c 111 KB