• Stephen Frost's avatar
    Correct off-by-one when reading from pipe · 03010366
    Stephen Frost authored
    In pg_basebackup.c:reached_end_position(), we're reading from an
    internal pipe with our own background process but we're possibly
    reading more bytes than will actually fit into our buffer due to
    an off-by-one error.  As we're reading from an internal pipe
    there's no real risk here, but it's good form to not depend on
    such convenient arrangements.
    
    Bug spotted by the Coverity scanner.
    
    Back-patch to 9.2 where this showed up.
    03010366
pg_basebackup.c 45.8 KB