From: Magnus Hagander Date: Sun, 9 Feb 2014 10:54:33 +0000 (+0100) Subject: Avoid printing uninitialized filename variable in verbose mode X-Git-Tag: REL9_4_BETA1~519 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01025d80a16c747641386e2909deb81e2f9423a6;p=postgresql 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 --- diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index 9d13d57748..a396c2fd93 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 {