summaryrefslogtreecommitdiff
path: root/contrib/sepgsql/hooks.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:12:04 -0400
commit844486216eeb5b483c7b45c13b05dce76387c69a (patch)
tree9582b2a3d61c20598c5d1f8129936f0e6a7c3d5d /contrib/sepgsql/hooks.c
parentc94b65f677875140b019bec1f7dc07bd2e14d45b (diff)
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 'contrib/sepgsql/hooks.c')
0 files changed, 0 insertions, 0 deletions