postgresql/src/backend/utils
Tom Lane 3dfffac701 Fix possible internal overflow in numeric multiplication.
mul_var() postpones propagating carries until it risks overflow in its
internal digit array.  However, the logic failed to account for the
possibility of overflow in the carry propagation step, allowing wrong
results to be generated in corner cases.  We must slightly reduce the
when-to-propagate-carries threshold to avoid that.

Discovered and fixed by Dean Rasheed, with small adjustments by me.

This has been wrong since commit d72f6c7503,
so back-patch to all supported branches.
2015-09-21 12:11:45 -04:00
..
adt Fix possible internal overflow in numeric multiplication. 2015-09-21 12:11:45 -04:00
cache Remove the SECURITY_ROW_LEVEL_DISABLED security context bit. 2015-09-20 20:47:36 -04:00
error pgindent run for 9.5 2015-05-23 21:35:49 -04:00
fmgr pgindent run for 9.5 2015-05-23 21:35:49 -04:00
hash Reorganize our CRC source files again. 2015-04-14 17:03:42 +03:00
init Remove the SECURITY_ROW_LEVEL_DISABLED security context bit. 2015-09-20 20:47:36 -04:00
mb Encoding PG_UHC is code page 949. 2015-08-14 20:23:35 -04:00
misc Remove the SECURITY_ROW_LEVEL_DISABLED security context bit. 2015-09-20 20:47:36 -04:00
mmgr Fix subtransaction cleanup after an outer-subtransaction portal fails. 2015-09-04 13:37:16 -04:00
resowner Update copyright for 2015 2015-01-06 11:43:47 -05:00
sort Fix bogus "out of memory" reports in tuplestore.c. 2015-08-04 18:18:46 -04:00
time pgindent run for 9.5 2015-05-23 21:35:49 -04:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
errcodes.txt Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
Gen_dummy_probes.sed Update copyright for 2015 2015-01-06 11:43:47 -05:00
Gen_fmgrtab.pl Allow forcing nullness of columns during bootstrap. 2015-02-21 22:31:54 +01:00
generate-errcodes.pl Update copyright for 2015 2015-01-06 11:43:47 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
probes.d Update copyright for 2015 2015-01-06 11:43:47 -05:00