xmlBufferCreate return value not checked in pgxmlNodeSetToText

Поиск
Список
Период
Сортировка
От Oleg Tselebrovskiy
Тема xmlBufferCreate return value not checked in pgxmlNodeSetToText
Дата
Msg-id 8e74efeb8af43caba7a9c6478e969d24@postgrespro.ru
обсуждение исходный текст
Список pgsql-hackers
Greetings, everyone!

While analyzing output of Svace static analyzer [1] I've found a bug.

In function pgxmlNodeSetToText there is a call of xmlBufferCreate that 
doesn't
have its return value checked. In all four other calls of 
xmlBufferCreate there
is a try...catch that checks the return value inside.

I suggest to add the same checks here that are used in other four calls 
of
xmlBufferCreate.

The proposed patch is attached.

[1] - https://svace.pages.ispras.ru/svace-website/en/

Oleg Tselebrovskiy, Postgres Pro
Вложения

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

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: Why is subscription/t/031_column_list.pl failing so much?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Returning non-terminated string in ECPG Informix-compatible function