Re: [BUGS] BUG #14468: One byte buffer overlow inquote_literal_cstr()
В списке pgsql-bugs по дате отправления:
| От | Alvaro Herrera |
|---|---|
| Тема | Re: [BUGS] BUG #14468: One byte buffer overlow inquote_literal_cstr() |
| Дата | |
| Msg-id | 20161216144351.apdbuk4je5ywekle@alvherre.pgsql обсуждение исходный текст |
| Ответ на | [BUGS] BUG #14468: One byte buffer overlow in quote_literal_cstr() (hlinnaka@iki.fi) |
| Список | pgsql-bugs |
hlinnaka@iki.fi wrote: > Looking at quote_literal_cstr(), it simply doesn't take into account the > space needed for the NULL terminator, when it allocates the buffer. The fix > is a straightforward + 1 to the allocation. I'll go and do that shortly, and > backpatch. Hm, that's a bit confusing. I thought the +3 included the terminator, but what it's actually for is the optional starting E; and the reason quote_literal doesn't need similar patching it is that there is no terminator 'cause it produces varlena. I would think this deserves a comment ... -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера