pgsql: Fix null-dereference crash in parse_xml_decl().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix null-dereference crash in parse_xml_decl().
Дата
Msg-id E1QQMWy-0000aa-Tg@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix null-dereference crash in parse_xml_decl().

parse_xml_decl's header comment says you can pass NULL for any unwanted
output parameter, but it failed to honor this contract for the "standalone"
flag.  The only currently-affected caller is xml_recv, so the net effect is
that sending a binary XML value containing a standalone parameter in its
xml declaration would crash the backend.  Per bug #6044 from Christopher
Dillard.

In passing, remove useless initializations of parse_xml_decl's output
parameters in xml_parse.

Back-patch to 8.3, where this code was introduced.

Branch
------
master

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

Modified Files
--------------
src/backend/utils/adt/xml.c |   10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix null-dereference crash in parse_xml_decl().
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Avoid compiler warning when building without zlib