]> git.ipfire.org Git - thirdparty/postgresql.git/commit
libpq: Use strerror_r instead of strerror
authorPeter Eisentraut <peter@eisentraut.org>
Sun, 28 Jul 2024 07:12:00 +0000 (09:12 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Sun, 28 Jul 2024 07:25:52 +0000 (09:25 +0200)
commit6ddc8556ce4aff68446ebe00f14930bc0bbeccca
treeaf2c522bdaff1c77c92bab7c4bd7cc4579ce7e89
parentce3045e9b0e5414638621a4941d8e7419fca9433
libpq: Use strerror_r instead of strerror

Commit 453c4687377 introduced a use of strerror() into libpq, but that
is not thread-safe.  Fix by using strerror_r() instead.

In passing, update some of the code comments added by 453c4687377, as
we have learned more about the reason for the change in OpenSSL that
started this.

Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: Discussion: https://postgr.es/m/b6fb018b-f05c-4afd-abd3-318c649faf18@highgo.ca
src/backend/libpq/be-secure-openssl.c
src/interfaces/libpq/fe-secure-openssl.c