aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/ecpglib/execute.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-09-21 12:11:32 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-09-21 12:11:45 -0400
commit3dfffac701cf95e3d9b86f12a3875f9b1b531231 (patch)
tree3e885bf7ae31bdbb3563c8d81dbab0f782d8a831 /src/interfaces/ecpg/ecpglib/execute.c
parentbbdb9dfbc3c722b4c811c5cbfa03ce79b7b74824 (diff)
downloadpostgresql-3dfffac701cf95e3d9b86f12a3875f9b1b531231.tar.gz
postgresql-3dfffac701cf95e3d9b86f12a3875f9b1b531231.zip
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 d72f6c75038d8d37e64a29a04b911f728044d83b, so back-patch to all supported branches.
Diffstat (limited to 'src/interfaces/ecpg/ecpglib/execute.c')
0 files changed, 0 insertions, 0 deletions