BUG #1270: stack overflow in thread in fe_getauthname

Поиск
Список
Период
Сортировка
От PostgreSQL Bugs List
Тема BUG #1270: stack overflow in thread in fe_getauthname
Дата
Msg-id 20040927230913.A5CB75A1039@www.postgresql.com
обсуждение исходный текст
Ответы Re: BUG #1270: stack overflow in thread in fe_getauthname  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: BUG #1270: stack overflow in thread in fe_getauthname  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1270
Logged by:          Peter Davie

Email address:      Peter.Davie@relevance.com.au

PostgreSQL version: 7.4.5

Operating system:   OSF/1 4.0f

Description:        stack overflow in thread in fe_getauthname

Details:

With the THREAD_SAFETY changes, a buffer is defined on the stack as:
char       pwdbuf[BUFSIZ];

This buffer overflows the stack when used in a thread.  As the application
creating the thread cannot be modified to increase the stack size, it would
probably be prudent to reduce this buffer size (I believe that BUFSIZ is
around 8192 bytes on most modern Unix implementations).

To rectify this issue (seg faults attempting to connect to the database), I
replaced the above declaration with:
char       pwdbuf[1024];
Obviously, a manifest constant would be better!

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Dollar quoting inside a regex bracket expression
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #1270: stack overflow in thread in fe_getauthname