summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2014-02-09 11:54:33 +0100
committerMagnus Hagander <magnus@hagander.net>2014-02-09 12:05:14 +0100
commit01025d80a16c747641386e2909deb81e2f9423a6 (patch)
tree9a12157880156a62cb8666ec7d23c5757da38b8c /src
parentcfa1b4a711dd03f824a9c3ab50911e61419d1eeb (diff)
Avoid printing uninitialized filename variable in verbose mode
When using verbose mode for pg_basebackup, in tar format sent to stdout, we'd print an unitialized buffer as the filename. Reported by Pontus Lundkvist
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 9d13d577485..a396c2fd93b 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -565,6 +565,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum)
else
#endif
tarfile = stdout;
+ strcpy(filename, "-");
}
else
{