]> granicus.if.org Git - postgresql/commit
Set errno to zero before invoking SSL_read or SSL_write. It appears that
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Dec 2009 03:45:46 +0000 (03:45 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Dec 2009 03:45:46 +0000 (03:45 +0000)
commit4847d5956c58faad15d03926e2cf97d59822a6ae
tree6bec006b88679681259317c499b00cfaa5a1c86d
parent3d4b0ab29cfee7cbb9932065216b58b6c820a791
Set errno to zero before invoking SSL_read or SSL_write.  It appears that
at least in some Windows versions, these functions are capable of returning
a failure indication without setting errno.  That puts us into an infinite
loop if the previous value happened to be EINTR.  Per report from Brendan
Hill.

Back-patch to 8.2.  We could take it further back, but since this is only
known to be an issue on Windows and we don't support Windows before 8.2,
it does not seem worth the trouble.
src/backend/libpq/be-secure.c
src/interfaces/libpq/fe-secure.c