Re: [BUGS] BUG #1270: stack overflow in thread in fe_getauthname - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUGS] BUG #1270: stack overflow in thread in fe_getauthname
Date
Msg-id 24145.1097298418@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #1270: stack overflow in thread in fe_getauthname  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [BUGS] BUG #1270: stack overflow in thread in fe_getauthname
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> What do people think about using (sizeof(struct passwd) + BUFLEN/2) rather
> than BUFLEN for the getpwuid_r size, or (sizeof(struct passwd) + MAXPGPATH*2)?
> That would reduce the stack requirements and still be safe, I think.

Why bother?

Peter did not say what his closed-source app could tolerate.  Without
that knowledge you're just flying blind about fixing his problem.
I see no reason to risk creating buffer-overflow issues for other people
in order to make a maybe-or-maybe-not improvement for one rather broken
closed-source app...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: more dirmod CYGWIN (was: APR 1.0 released)
Next
From: Oliver Elphick
Date:
Subject: Re: Inability to cast regclass is too restrictive