diff --git a/src/config/pool_config.l b/src/config/pool_config.l
index b16130293..defedffbd 100644
--- a/src/config/pool_config.l
+++ b/src/config/pool_config.l
@@ -6,7 +6,7 @@
  * pgpool: a language independent connection pool server for PostgreSQL
  * written by Tatsuo Ishii
  *
- * Copyright (c) 2003-2024	PgPool Global Development Group
+ * Copyright (c) 2003-2025	PgPool Global Development Group
  *
  * Permission to use, copy, modify, and distribute this software and
  * its documentation for any purpose and without fee is hereby
@@ -654,7 +654,7 @@ char *pool_flag_to_str(unsigned short flag)
 		if (*buf == '\0')
 			snprintf(buf, sizeof(buf), "ALWAYS_PRIMARY");
 		else
-			snprintf(buf+strlen(buf), sizeof(buf), "|ALWAYS_PRIMARY");
+			strncat(buf, "|ALWAYS_PRIMARY", sizeof(buf));
 	}
 
 	return buf;
