Re: PATCH: Fix wrong size argument to pg_strncasecmp

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PATCH: Fix wrong size argument to pg_strncasecmp
Дата
Msg-id 23800.1580509696@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PATCH: Fix wrong size argument to pg_strncasecmp  (Dominik Czarnota <dominik.b.czarnota@gmail.com>)
Список pgsql-hackers
Dominik Czarnota <dominik.b.czarnota@gmail.com> writes:
> This patch fixes a size parameter of `pg_strncasecmp` which compared a
> "string" literal with a variable by passing a size of 5 while the "string"
> literal has 6 bytes.

Pushed, thanks for the report!

> By the way, the `strncasecmp` usages around the fixed line could use
> `strcasecmp` which doesn't accept the `size_t n` argument.

Maybe.  It's not clear to me that it's be okay to assume that the
variable input string is null-terminated.

            regards, tom lane



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