1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-06 18:42:54 +03:00

StrNCpy -> strlcpy (not complete)

This commit is contained in:
Peter Eisentraut
2007-02-10 14:58:55 +00:00
parent 1a1474b4c0
commit 4ab8fcba8a
16 changed files with 58 additions and 58 deletions

View File

@@ -4,7 +4,7 @@
*
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.46 2007/01/05 22:19:46 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc-file.l,v 1.47 2007/02/10 14:58:55 petere Exp $
*/
%{
@@ -218,7 +218,7 @@ ParseConfigFile(const char *config_file, const char *calling_file,
if (!is_absolute_path(config_file))
{
Assert(calling_file != NULL);
StrNCpy(abs_path, calling_file, MAXPGPATH);
strlcpy(abs_path, calling_file, sizeof(abs_path));
get_parent_directory(abs_path);
join_path_components(abs_path, abs_path, config_file);
canonicalize_path(abs_path);