pgsql: Fix out-of-bounds read in json_lex_string

Поиск
Список
Период
Сортировка
От John Naylor
Тема pgsql: Fix out-of-bounds read in json_lex_string
Дата
Msg-id E1oB7Us-002Nic-BI@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Fix out-of-bounds read in json_lex_string  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-committers
Fix out-of-bounds read in json_lex_string

Commit 3838fa269 added a lookahead loop to allow building strings multiple
bytes at a time. This loop could exit because it reached the end of input,
yet did not check for that before checking if we reached the end of a
valid string. To fix, put the end of string check back in the outer loop.

Per Valgrind animal skink

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d3117fc1a3e87717a57be0153408e5387e265e1b

Modified Files
--------------
src/common/jsonapi.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)


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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: pgsql: Build de-escaped JSON strings in larger chunks during lexing
Следующее
От: John Naylor
Дата:
Сообщение: Re: pgsql: Fix out-of-bounds read in json_lex_string