Unlikely-to-happen crash in ecpg driver caused by NULL-pointer check not done

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Unlikely-to-happen crash in ecpg driver caused by NULL-pointer check not done
Дата
Msg-id CAB7nPqSnZMiRMZ_HJ2XLm2i9jcs3SPRJ-8hBmG0f24OjHcyc+A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Unlikely-to-happen crash in ecpg driver caused by NULL-pointer check not done  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
Hi all,

In ecpg_add_mem of memory.c, we use ecpg_alloc but there is actually
no NULL-pointer check. If an OOM shows up exactly at this point, this
is likely to cause a crash. Attached patch adds some extra processing
to ecpg_add_mem to check if the allocation fails, and to fail properly
if an OOM appears.
This issue has been pointed out by Coverity, and I guessed the legwork
needed by myself.
Regards,
--
Michael

Вложения

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Missing markup in pg_receivexlog.sgml
Следующее
От: "Stephen R. van den Berg"
Дата:
Сообщение: Table description in the data file (Re: pg_rawdump)