summaryrefslogtreecommitdiff
path: root/src/backend/libpq/password.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/libpq/password.c')
-rw-r--r--src/backend/libpq/password.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/libpq/password.c b/src/backend/libpq/password.c
index 55f77508bb..555e9c645e 100644
--- a/src/backend/libpq/password.c
+++ b/src/backend/libpq/password.c
@@ -80,8 +80,7 @@ verify_password(char *user, char *password, Port *port,
/* kill the newline */
test_pw[strlen(test_pw)-1] = '\0';
- strncpy(salt, test_pw, 2);
- salt[2] = '\0';
+ strNcpy(salt, test_pw, 2);
if(strcmp(user, test_user) == 0) {
/* we're outta here one way or the other. */