diff options
author | Magnus Hagander <magnus@hagander.net> | 2014-02-09 11:54:33 +0100 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2014-02-09 12:09:55 +0100 |
commit | c6e5c4dd1d9ba2abb7970c9dc920ecaf43837435 (patch) | |
tree | 861c022d6d0eba4ff28c47854ea0b81106f4ae90 /src | |
parent | 308dd5b0dc6b4219d7c35004922cc840000052cd (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.c | 1 |
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 722d54c995f..3ed6d17dd3b 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -300,6 +300,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum) else #endif tarfile = stdout; + strcpy(filename, "-"); } else { |