Thread: pgsql: Check return value of strdup() in libpq connection option parsin

pgsql: Check return value of strdup() in libpq connection option parsin

From
Heikki Linnakangas
Date:
Check return value of strdup() in libpq connection option parsing.

An out-of-memory in most of these would lead to strange behavior, like
connecting to a different database than intended, but some would lead to
an outright segfault.

Alex Shulgin and me. Backpatch to all supported versions.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5053ad20661c913671a5cbbf6389357b5c90d441

Modified Files
--------------
src/interfaces/libpq/fe-connect.c |  187 ++++++++++++++++++++++++++-----------
1 file changed, 133 insertions(+), 54 deletions(-)