postgres.git / summary / log / commit / refs

commit    c6e5c4dd1d9ba2abb7970c9dc920ecaf43837435
Author:   Magnus Hagander <magnus@hagander.net>
Date:     Sun Feb 09 10:54:33 2014 +0000
First released in: 9.4.0, 9.1.12, 9.2.7, 9.3.3

    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


src/bin/pg_basebackup/pg_basebackup.c | 1 + 1 file changed, 1 insertion(+) 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 { [parent: 308dd5b0dc6b]