From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Parse more strictly integer parameters from connection strings i |
Date: | 2018-09-11 21:48:56 |
Message-ID: | E1fzqWm-0000kx-HO@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Parse more strictly integer parameters from connection strings in libpq
The following parameters have been parsed in lossy ways when specified
in a connection string processed by libpq:
- connect_timeout
- keepalives
- keepalives_count
- keepalives_idle
- keepalives_interval
- port
Overflowing values or the presence of incorrect characters were not
properly checked, leading to libpq trying to use such values and fail
with unhelpful error messages. This commit hardens the parsing of those
parameters so as it is possible to find easily incorrect values.
Author: Fabien Coelho
Reviewed-by: Peter Eisentraut, Michael Paquier
Discussion: https://postgr.es/m/alpine.DEB.2.21.1808171206180.20841@lancre
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/e7a2217978d9cbb2149bfcb4ef1e45716cfcbefb
Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 63 +++++++++++++++++++++++++++++++++------
1 file changed, 54 insertions(+), 9 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-09-11 22:45:24 | pgsql: Add PQresultMemorySize function to report allocated size of a PG |
Previous Message | Bruce Momjian | 2018-09-11 21:02:03 | pgsql: doc: adjust PG 11 release notes |