pgsql: Fix write-past-buffer-end in ldapServiceLookup().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix write-past-buffer-end in ldapServiceLookup().
Дата
Msg-id E1QKYHc-0000ZI-Q4@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix write-past-buffer-end in ldapServiceLookup().

The code to assemble ldap_get_values_len's output into a single string
wrote the terminating null one byte past where it should.  Fix that,
and make some other cosmetic adjustments to make the code a trifle more
readable and more in line with usual Postgres coding style.

Also, free the "result" string when done with it, to avoid a permanent
memory leak.

Bug report and patch by Albe Laurenz, cosmetic adjustments by me.

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/3b65ffa2bf44ea3a1d2b20968a40e72e9fb4687f

Modified Files
--------------
src/interfaces/libpq/fe-connect.c |   20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix assorted typos
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix write-past-buffer-end in ldapServiceLookup().