Re: Oops in fe-auth.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Oops in fe-auth.c
Date
Msg-id 24126.1185200937@sss.pgh.pa.us
Whole thread Raw
In response to Oops in fe-auth.c  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Oops in fe-auth.c  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> When run in debug mode, the runtime for msvc will *zero-pad the entire
> buffer* in a strncpy() call. This in itself is not bad (just slow), but it
> shows a rather bad bug in libpq.

[squint]  That is the specified behavior of strncpy on every platform,
not only msvc.  If there's a bug here why didn't we notice it long ago?

> Given this, I'll go ahead and fix fe-connect to support PQExpBuffers,
> unless there are any objections.

I'm not against that, but I question what bug you've really found.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Oops in fe-auth.c
Next
From: Tom Lane
Date:
Subject: Re: SSPI vs MingW