Re: Unicode normalization SQL functions

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Unicode normalization SQL functions
Дата
Msg-id 43f13518-010a-8319-8013-f319522ea719@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Unicode normalization SQL functions  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: Unicode normalization SQL functions
Список pgsql-hackers
On 2020-01-28 10:48, Daniel Verite wrote:
> I found a bug in unicode_is_normalized_quickcheck() which is
> triggered when the last codepoint of the string is beyond
> U+10000. On encountering it, it does:
> +        if (is_supplementary_codepoint(ch))
> +            p++;
> When ch is the last codepoint, it makes p point to
> the ending zero, but the subsequent p++ done by
> the for loop makes it miss the exit and go into over-reading.
> 
> But anyway, what's the reason for skipping the codepoint
> following a codepoint outside of the BMP?

You're right, this didn't make any sense.  Here is a new patch set with 
that fixed.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: making the backend's json parser work in frontend code
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Removing pg_pltemplate and creating "trustable" extensions