Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 680baa8

Browse files
committed
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
1 parent eb3d350 commit 680baa8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,7 @@ ReceiveTarFile(PGconn *conn, PGresult *res, int rownum)
563563
else
564564
#endif
565565
tarfile = stdout;
566+
strcpy(filename, "-");
566567
}
567568
else
568569
{

0 commit comments

Comments
 (0)