mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
StrNCpy -> strlcpy (not complete)
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.122 2007/01/05 22:20:00 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.123 2007/02/10 14:58:55 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -418,7 +418,7 @@ pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq)
|
||||
{
|
||||
char salt[3];
|
||||
|
||||
StrNCpy(salt, conn->cryptSalt, 3);
|
||||
strlcpy(salt, conn->cryptSalt, sizeof(salt));
|
||||
crypt_pwd = crypt(password, salt);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user