diff options
Diffstat (limited to 'contrib/pgcrypto/crypt-des.c')
-rw-r--r-- | contrib/pgcrypto/crypt-des.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/pgcrypto/crypt-des.c b/contrib/pgcrypto/crypt-des.c index 4ed44beeff5..b43141fed5c 100644 --- a/contrib/pgcrypto/crypt-des.c +++ b/contrib/pgcrypto/crypt-des.c @@ -708,7 +708,7 @@ px_crypt_des(const char *key, const char *setting) if (des_setkey((char *) keybuf)) return (NULL); } - strncpy(output, setting, 9); + StrNCpy(output, setting, 10); /* * Double check that we weren't given a short setting. If we were, the @@ -716,7 +716,6 @@ px_crypt_des(const char *key, const char *setting) * salt, but we don't really care. Just make sure the output string * doesn't have an extra NUL in it. */ - output[9] = '\0'; p = output + strlen(output); } else |