]> granicus.if.org Git - postgresql/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:43 +0000 (11:42 -0500)
commit3e6e98c5a8551e3b90bbc82d5bdad2f574a6f508
treed9d9f81c9850eb4405b3722e012dd2cab1582192
parent6823bc282943b44a57cdde3921621f7d83598d83
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