]> git.ipfire.org Git - thirdparty/postgresql.git/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:46:08 +0000 (03:46 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 30 Dec 2009 03:46:08 +0000 (03:46 +0000)
commit2de646cd8f31318b1642c0f2cb717b32207d53e0
tree5c6cf8cebfb3ffb4d55cc687df62d8656e2606d6
parent31c88772c80cf3863ac538d96187640d41f18884
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