]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 1 Dec 2015 16:42:25 +0000 (11:42 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 1 Dec 2015 16:42:47 +0000 (11:42 -0500)
commit74cf6defa79c64ce8ac3548210686abc3e8695d1
tree4519483dc3296d25ce581d9336c3fe08a210802e
parent47e189b5a10fdc5b983d1917e6f641ee80fa500b
Use "g" not "f" format in ecpg's PGTYPESnumeric_from_double().

The previous coding could overrun the provided buffer size for a very large
input, or lose precision for a very small input.  Adopt the methodology
that's been in use in the equivalent backend code for a long time.

Per private report from Bas van Schaik.  Back-patch to all supported
branches.
src/interfaces/ecpg/pgtypeslib/numeric.c