Skip to content

Commit e4db972

Browse files
committed
Use explicit_bzero() when clearing sslpassword in libpq
Since 74a308c, any security-sensitive information gets cleared from memory this way. This was forgotten in 4dc6355. Author: Daniel Gustafsson Reviewed-by: Peter Eisentraut, Michael Paquier Discussion: https://postgr.es/m/935443BA-D42E-4CE0-B181-1AD79E6DD45A@yesql.se
1 parent d2a9959 commit e4db972

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4037,7 +4037,10 @@ freePGconn(PGconn *conn)
40374037
if (conn->sslkey)
40384038
free(conn->sslkey);
40394039
if (conn->sslpassword)
4040+
{
4041+
explicit_bzero(conn->sslpassword, strlen(conn->sslpassword));
40404042
free(conn->sslpassword);
4043+
}
40414044
if (conn->sslrootcert)
40424045
free(conn->sslrootcert);
40434046
if (conn->sslcrl)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy