From: | John Naylor <john(dot)naylor(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fix range check in ECPG numeric to int conversion |
Date: | 2021-07-30 20:43:22 |
Message-ID: | E1m9ZLm-000221-6Y@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix range check in ECPG numeric to int conversion
The previous coding guarded against -INT_MAX instead of INT_MIN,
leading to -2147483648 being rejected as out of range.
Per bug #17128 from Kevin Sweet
Discussion: https://www.postgresql.org/message-id/flat/17128-55a8a879727a3e3a%40postgresql.org
Reviewed-by: Tom Lane
Backpatch to all supported branches
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/171bf1cea579ce11bc7f0b2986f052022f2b6be1
Modified Files
--------------
doc/src/sgml/ecpg.sgml | 2 +-
src/interfaces/ecpg/pgtypeslib/numeric.c | 7 ++++++-
.../ecpg/test/expected/pgtypeslib-num_test.c | 21 ++++++++++++++++-----
.../ecpg/test/expected/pgtypeslib-num_test.stderr | 2 +-
.../ecpg/test/expected/pgtypeslib-num_test.stdout | 2 ++
src/interfaces/ecpg/test/pgtypeslib/num_test.pgc | 13 ++++++++++++-
6 files changed, 38 insertions(+), 9 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2021-07-30 22:16:14 | pgsql: Improve documentation for START_REPLICATION ... LOGICAL. |
Previous Message | Tom Lane | 2021-07-30 18:50:29 | pgsql: Doc: add a glossary entry for "domain". |