Re: Possible memory corruption (src/timezone/zic.c b/src/timezone/zic.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Possible memory corruption (src/timezone/zic.c b/src/timezone/zic.c)
Дата
Msg-id CAEudQAqH7J8wSjSPwPx6_Pk4yyvF+NnHPagJqwZvpb7bqc3UEQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Possible memory corruption (src/timezone/zic.c b/src/timezone/zic.c)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Possible memory corruption (src/timezone/zic.c b/src/timezone/zic.c)
Список pgsql-hackers
Em sex., 14 de mai. de 2021 às 19:52, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
I wrote:
> So the question for us is whether it's worth trying to make pgreadlink
> conform to the letter of the POSIX spec in this detail.  TBH, I can't
> get excited about that, at least not so far as zic's usage is concerned.

Hmmm ... on closer inspection, though, it might not be that hard.
pgreadlink is already using a fixed-length buffer (with only enough
room for MAX_PATH WCHARs) for the input of WideCharToMultiByte.  So
it could use a fixed-length buffer of say 4 * MAX_PATH bytes for the
output, and then transfer just the appropriate amount of data to the
caller's buffer.
Following your directions, maybe something like this will solve?

regards,
Ranier Vilela
Вложения

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

Предыдущее
От: Ajin Cherian
Дата:
Сообщение: Re: [HACKERS] logical decoding of two-phase transactions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: amvalidate(): cache lookup failed for operator class 123