Re: Possible memory corruption (src/timezone/zic.c b/src/timezone/zic.c)
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Possible memory corruption (src/timezone/zic.c b/src/timezone/zic.c) |
| Дата | |
| Msg-id | 2199808.1621032731@sss.pgh.pa.us обсуждение |
| Ответ на | 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 |
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.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера