| От | Peter Eisentraut |
|---|---|
| Тема | Re: byteain for new hex escaped data |
| Дата | |
| Msg-id | 1258551030.3497.32.camel@fsopti579.F-Secure.com обсуждение исходный текст |
| Ответ на | byteain for new hex escaped data (Kris Jurka <books@ejurka.com>) |
| Список | pgsql-hackers |
On ons, 2009-11-18 at 06:46 -0500, Kris Jurka wrote: > Looking at how byteain detects whether the input it is passed is the new > hex format escape or the old octal escape, it uses: > > char *inputText = PG_GETARG_CSTRING(0); > if (inputText[0] == '\\' && inputText[1] == 'x') > > Doesn't this read off the end of inputText in the case of "SELECT > ''::bytea", or is there some padding happening somewhere that makes this > legal? In case of ''::bytea, the inputText is "" as a C string, and so inputText[0] == '\0' and the second test is not executed.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера