• Michael Paquier's avatar
    Fix fuzzy error handling in pg_basebackup when opening gzFile · 177be9ed
    Michael Paquier authored
    First, this code did not bother checking for a failure when calling
    dup().  Then, per zlib, gzerror() returns NULL for a NULL input, which
    can happen if passing down to gzdopen() an invalid file descriptor or if
    there was an allocation failure.
    
    No back-patch is done as this would unlikely be a problem in the field.
    
    Per Coverity.
    
    Reported-by: Tom Lane
    177be9ed
pg_basebackup.c 60.1 KB