To avoid static analyzers sounding the alarm, move to using snprintf
instead of sprintf. This was an oversight in
66d6086cbcbfc8dee789a6.
Reported-by: Tom Lane
Discussion: https://postgr.es/m/849588.
1698179694@sss.pgh.pa.us
{
char s[16];
- sprintf(s, "%d", port);
+ snprintf(s, sizeof(s), "%d", port);
setenv("PGPORT", s, 1);
}
}
{
char s[16];
- sprintf(s, "%d", port);
+ snprintf(s, sizeof(s), "%d", port);
setenv("PGPORT", s, 1);
}
if (user != NULL)