pgsql: Fix possible internal overflow in numeric division.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix possible internal overflow in numeric division.
Date: 2015-11-17 20:47:33
Message-ID: E1ZynA5-0003lS-3v@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix possible internal overflow in numeric division.

div_var_fast() postpones propagating carries in the same way as mul_var(),
so it has the same corner-case overflow risk we fixed in 246693e5ae8a36f0,
namely that the size of the carries has to be accounted for when setting
the threshold for executing a carry propagation step. We've not devised
a test case illustrating the brokenness, but the required fix seems clear
enough. Like the previous fix, back-patch to all active branches.

Dean Rasheed

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5f10b7a604c87fc61a2c20a56552301f74c9bd5f

Modified Files
--------------
src/backend/utils/adt/numeric.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2015-11-17 23:00:20 Re: [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.
Previous Message Tom Lane 2015-11-17 19:15:05 Re: [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.