Re: [PATCH] pgcrypto: Test for NULL before dereferencing pointer

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: [PATCH] pgcrypto: Test for NULL before dereferencing pointer
Дата
Msg-id 4CBF442E.3060301@enterprisedb.com
обсуждение исходный текст
Ответ на [PATCH] pgcrypto: Test for NULL before dereferencing pointer  (Marti Raudsepp <marti@juffo.org>)
Ответы Re: [PATCH] pgcrypto: Test for NULL before dereferencing pointer  (Marti Raudsepp <marti@juffo.org>)
Список pgsql-hackers
On 20.10.2010 18:44, Marti Raudsepp wrote:
> Hi pgsql-hackers,
>
> Currently contrib/pgcrypto/pgp-pubenc.c contains code like:
>
> uint8 algo = pk->algo;
> if (pk == NULL)
> ...
>
> However, if pk was NULL, then the if() condition would never be
> reached because the pk->algo dereference would segfault.
>
> This patch moves the dereference to below the condition which was the
> intended behavior.

Thanks, applied. Did coccicheck find anything else interesting?

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Review: Fix snapshot taking inconsistencies
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PostgreSQL and HugePage