Error handling fix in interfaces/libpq/fe-secure.c

From: jtv(at)xs4all(dot)nl
To: pgsql-patches(at)postgresql(dot)org
Subject: Error handling fix in interfaces/libpq/fe-secure.c
Date: 2005-07-05 13:05:43
Message-ID: 14242.202.47.227.25.1120568743.squirrel@202.47.227.25
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Here's another one similar to what I described in my previous message. In
libpq's pqsecure_read(), if SSL_read() returns -1 and sets an error of
SSL_ERROR_SYSCALL, errno may be polluted by libpq_gettext() before a
human-readable string is derived from it. Also, pqReadData() will see the
wrong errno value after the call.

The attached patch fixes both by introducing a named variable to hold the
significant value of errno.

Jeroen

Attachment Content-Type Size
fe-secure.patch text/x-patch 533 bytes

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Fuhr 2005-07-05 14:00:52 Re: Python setof patch
Previous Message jtv 2005-07-05 11:26:09 patch: garbage error strings in libpq