mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Get rid of unsafe sprintf and snprintf usages. Per compiler warnings.
This commit is contained in:
@ -62,10 +62,10 @@ get_control_data(migratorContext *ctx, ClusterInfo *cluster, bool live_check)
|
||||
#else
|
||||
SetEnvironmentVariableA("LANG", "C");
|
||||
#endif
|
||||
sprintf(cmd, SYSTEMQUOTE "\"%s/%s \"%s\"" SYSTEMQUOTE,
|
||||
cluster->bindir,
|
||||
live_check ? "pg_controldata\"" : "pg_resetxlog\" -n",
|
||||
cluster->pgdata);
|
||||
snprintf(cmd, sizeof(cmd), SYSTEMQUOTE "\"%s/%s \"%s\"" SYSTEMQUOTE,
|
||||
cluster->bindir,
|
||||
live_check ? "pg_controldata\"" : "pg_resetxlog\" -n",
|
||||
cluster->pgdata);
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
|
||||
|
Reference in New Issue
Block a user