Correct off-by-one when reading from pipe
Correct off-by-one when reading from pipe

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.

techdragon/Postgres-XL,lisakowen/gpdb,ashwinstar/gpdb,zeroae/postgres-xl,xinzweb/gpdb,greenplum-db/gpdb,pavanvd/postgres-xl,50wu/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,oberstet/postgres-xl,ashwinstar/gpdb,Postgres-XL/Postgres-XL,oberstet/postgres-xl,ovr/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,adam8157/gpdb,oberstet/postgres-xl,jmcatamney/gpdb,zeroae/postgres-xl,50wu/gpdb,ashwinstar/gpdb,lisakowen/gpdb,lisakowen/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,ashwinstar/gpdb,adam8157/gpdb,yazun/postgres-xl,greenplum-db/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,techdragon/Postgres-XL,50wu/gpdb,50wu/gpdb,jmcatamney/gpdb,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,pavanvd/postgres-xl,adam8157/gpdb,greenplum-db/gpdb,oberstet/postgres-xl,techdragon/Postgres-XL,adam8157/gpdb,jmcatamney/gpdb,pavanvd/postgres-xl,xinzweb/gpdb,yazun/postgres-xl,adam8157/gpdb,zeroae/postgres-xl,jmcatamney/gpdb,ashwinstar/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,yazun/postgres-xl,ovr/postgres-xl,techdragon/Postgres-XL,zeroae/postgres-xl,Postgres-XL/Postgres-XL,lisakowen/gpdb,adam8157/gpdb,pavanvd/postgres-xl,ovr/postgres-xl,jmcatamney/gpdb,xinzweb/gpdb,50wu/gpdb,xinzweb/gpdb,zeroae/postgres-xl,50wu/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,50wu/gpdb,ovr/postgres-xl,xinzweb/gpdb,adam8157/gpdb,xinzweb/gpdb,ashwinstar/gpdb,yazun/postgres-xl,jmcatamney/gpdb,lisakowen/gpdb,yazun/postgres-xl,lisakowen/gpdb,ovr/postgres-xl,xinzweb/gpdb,lisakowen/gpdb,oberstet/postgres-xl,adam8157/gpdb,greenplum-db/gpdb,lisakowen/gpdb