pgsql: Fix unsafe use of strtol() on a non-null-terminated Text datum.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix unsafe use of strtol() on a non-null-terminated Text datum.
Дата
Msg-id E1aik0T-00010x-H1@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix unsafe use of strtol() on a non-null-terminated Text datum.

jsonb_set() could produce wrong answers or incorrect error reports, or in
the worst case even crash, when trying to convert a path-array element into
an integer for use as an array subscript.  Per report from Vitaly Burovoy.
Back-patch to 9.5 where the faulty code was introduced (in commit
c6947010ceb42143).

Michael Paquier

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/5f95521b3a4ede720d8927383d79b11e37b6bc80

Modified Files
--------------
src/backend/utils/adt/jsonfuncs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: pgsql: Change comment to describe correct lock level used
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix unsafe use of strtol() on a non-null-terminated Text datum.