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_3_3~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=680baa8d242aa0721ffa11957d2a2d90ee61f3bd;p=thirdparty%2Fpostgresql.git 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 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 {