Fix some null pointer dereferences in LDAP auth code

Peter Eisentraut <peter_e@gmx.net>

Commit: f9e2885d51bf585bec2d5ffeda4f9e5e1a723f4d
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2017-11-10T19:27:51Z
Releases: 10.2
Fix some null pointer dereferences in LDAP auth code

An LDAP URL without a host name such as "ldap://" or without a base DN
such as "ldap://localhost" would cause a crash when reading pg_hba.conf.

If no binddn is configured, an error message might end up trying to print a
null pointer, which could crash on some platforms.

Author: Thomas Munro <thomas.munro@enterprisedb.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>

Files

PathChange+/−
src/backend/libpq/auth.c modified +2 −1
src/backend/libpq/hba.c modified +4 −2