aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/regress/pg_regress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index b0af751c92e..b35e87295e3 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -845,7 +845,7 @@ initialize_environment(void)
{
char s[16];
- sprintf(s, "%d", port);
+ snprintf(s, sizeof(s), "%d", port);
setenv("PGPORT", s, 1);
}
}
@@ -867,7 +867,7 @@ initialize_environment(void)
{
char s[16];
- sprintf(s, "%d", port);
+ snprintf(s, sizeof(s), "%d", port);
setenv("PGPORT", s, 1);
}
if (user != NULL)