aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.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:10 -0400
commit5f79730ec0f015e3168e822ee25554cff5fbe070 (patch)
treec2e492cfd819517b0623b2e4062e7d5b88644ee0 /src/backend/executor/nodeModifyTable.c
parent5dc49efe9012793110ef5dab9a9a1a7730a70e3f (diff)
downloadpostgresql-5f79730ec0f015e3168e822ee25554cff5fbe070.tar.gz
postgresql-5f79730ec0f015e3168e822ee25554cff5fbe070.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/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions