pgsql: Don't use ordinary NULL-terminated strings as Name datums.

Поиск
Список
Период
Сортировка
От Noah Misch
Тема pgsql: Don't use ordinary NULL-terminated strings as Name datums.
Дата
Msg-id E1Umuui-0007kc-L7@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Don't use ordinary NULL-terminated strings as Name datums.

Consumers are entitled to read the full 64 bytes pertaining to a Name;
using a shorter NULL-terminated string leads to reading beyond the end
its allocation; a SIGSEGV is possible.  Use the frequent idiom of
copying to a NameData on the stack.  New in 9.3, so no back-patch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/ff53890f687c7f6b2a10db6661e9c32faf832636

Modified Files
--------------
src/backend/commands/alter.c         |    4 +++-
src/backend/commands/event_trigger.c |    8 ++++++--
2 files changed, 9 insertions(+), 3 deletions(-)


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

Предыдущее
От: Noah Misch
Дата:
Сообщение: pgsql: Avoid reading past datum end when parsing JSON.
Следующее
От: Noah Misch
Дата:
Сообщение: pgsql: Avoid reading below the start of a stack variable in tokenize_fi