* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2021 PgPool Global Development Group
+ * Copyright (c) 2003-2022 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
fprintf(stderr, "LINE#%02d: input exceeds maximum username length %d\n",line_count, MAX_USER_NAME_LEN);
goto clear_buffer;
}
- strncpy(username, buf, sizeof(username) - 1);
+ strncpy(username, buf, pch - buf - 1);
if (strlen(pch) >= sizeof(password))
{
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
- * Copyright (c) 2003-2021 PgPool Global Development Group
+ * Copyright (c) 2003-2022 PgPool Global Development Group
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
fprintf(stdout, "input exceeds maximum username length %d\n\n", MAX_USER_NAME_LEN);
continue;
}
- strncpy(username, buf, sizeof(username) - 1);
+ strncpy(username, buf, pch - buf - 1);
if (strlen(pch) >= sizeof(password))
{