mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Replace some strncpy() by strlcpy().
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.372 2007/02/01 19:10:28 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.373 2007/02/07 00:52:35 petere Exp $
|
||||
*
|
||||
*--------------------------------------------------------------------
|
||||
*/
|
||||
@ -5729,8 +5729,7 @@ ParseLongOption(const char *string, char **name, char **value)
|
||||
if (string[equal_pos] == '=')
|
||||
{
|
||||
*name = guc_malloc(FATAL, equal_pos + 1);
|
||||
strncpy(*name, string, equal_pos);
|
||||
(*name)[equal_pos] = '\0';
|
||||
strlcpy(*name, string, equal_pos + 1);
|
||||
|
||||
*value = guc_strdup(FATAL, &string[equal_pos + 1]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user