Re: [PATCH] json_lex_string: don't overread on bad UTF8
От | Jacob Champion |
---|---|
Тема | Re: [PATCH] json_lex_string: don't overread on bad UTF8 |
Дата | |
Msg-id | CAOYmi+kSYoLZm9OTa022VKOrXOmbKuGvanNus59gDHg0kAhzMA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] json_lex_string: don't overread on bad UTF8 (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: [PATCH] json_lex_string: don't overread on bad UTF8
|
Список | pgsql-hackers |
On Tue, May 7, 2024 at 10:31 PM Michael Paquier <michael@paquier.xyz> wrote: > But looking closer, I can see that in the JSON_INVALID_TOKEN case, > when !tok_done, we set token_terminator to point to the end of the > token, and that would include an incomplete byte sequence like in your > case. :/ Ah, I see what you're saying. Yeah, that approach would need some more invasive changes. > This situation makes me > uncomfortable and we should put more effort in printing error messages > in a readable format, but that could always be tackled later as a > separate problem.. And I don't see something backpatchable at short > sight for v16. Agreed. Fortunately (or unfortunately?) I think the JSON client-encoding work is now a prerequisite for OAuth in libpq, so hopefully some improvements can fall out of that work too. > Thoughts and/or objections? None here. Thanks! --Jacob
В списке pgsql-hackers по дате отправления: