[BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема [BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption
Дата
Msg-id 2a4bd2f5-2a2f-409f-8ac7-110dd3fad4fc@app.fastmail.com
обсуждение исходный текст
Ответы Re: [BUGFIX] Fix crash due to sizeof bug in RegisterExtensionExplainOption
Список pgsql-hackers
Hi hackers,

The allocations in src/backend/commands/explain_state.c
used sizeof(char *) instead of sizeof(ExplainExtensionOption),
which could cause a crash if an extension would register
more than 8 extension EXPLAIN options:

Attached small example extension, test_explain_state.txt,
to demonstrate the bug:

LOAD 'test_explain_state';
LOAD
EXPLAIN (test_explain_opt9) SELECT 1;
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
connection to server was lost

/Joel

Вложения

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