Re: Bug #925: typing error in src/backend/libpq/be-secure.c - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #925: typing error in src/backend/libpq/be-secure.c
Date
Msg-id 26886.1048911817@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug #925: typing error in src/backend/libpq/be-secure.c  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Bug #925: typing error in src/backend/libpq/be-secure.c  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-bugs
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Yep, typo.  Patched to CVS current and backpatched to 7.3.X.

I think this fix is exactly backward.  Why would SSL_write need to
return ERROR_WANT_WRITE?  It couldn't.  The correct fix is that
SSL_write might return ERROR_WANT_READ, for which reading would be
the right response.

BTW the real problem, both here and elsewhere in this file, is the
lack of a "default: elog-out" case in the switch statements.  This
code will simply break if any unexpected case occurs.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Bug #925: typing error in src/backend/libpq/be-secure.c
Next
From: Bruce Momjian
Date:
Subject: Re: Bug #925: typing error in src/backend/libpq/be-secure.c