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:18 +0100 |
commit | 680baa8d242aa0721ffa11957d2a2d90ee61f3bd (patch) | |
tree | e10cdfadaaa1b8d82d40e686e94246cd0a8bfedb /src | |
parent | eb3d350db3fe89e9f58aa82f6b490e2aa457028f (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 a1e12a8aaa3..34788122cca 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -563,6 +563,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum) else #endif tarfile = stdout; + strcpy(filename, "-"); } else { |