Re: Problem with setlocale (found in libecpg) [accessing a memory location after freeing it]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with setlocale (found in libecpg) [accessing a memory location after freeing it]
Дата
Msg-id 13272.1001794501@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem with setlocale (found in libecpg) [accessing a memory location after freeing it]  (Michael Meskes <meskes@postgresql.org>)
Список pgsql-patches
Michael Meskes <meskes@postgresql.org> writes:
> You're partially right. Standard says "This  string  may  be allocated  in
> static storage." So, yes, with your patch we are on the safe side. I just
> committed the changes.

This patch wasn't right: setlocale(LC_NUMERIC, "C") returns a string
corresponding to the *new* locale setting, not the old one.  Therefore,
while the patched code failed to dump core, it also failed to restore
the previous locale setting as intended.  I have committed an updated
version.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: regression tests for pgcrypto
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: More fixes for missing double quotes in the shell