Re: NULL dereference when memory is tight

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: NULL dereference when memory is tight
Дата
Msg-id AANLkTinMQwZDCpGCZcbHE7exyNsp18UQ9SLDq0K8Jwq2@mail.gmail.com
обсуждение исходный текст
Ответ на NULL dereference when memory is tight  (Brian Sutherland <brian@vanguardistas.net>)
Ответы Re: NULL dereference when memory is tight  (Brian Sutherland <brian@vanguardistas.net>)
Список psycopg
On Sun, Feb 20, 2011 at 4:47 PM, Brian Sutherland
<brian@vanguardistas.net> wrote:
> Hi,
>
> I recently found a few places in the latest beta release where a NULL
> dereference could occur when insufficient memory is available.
>
> For example in connection_type.c:
>
>     830     self->dsn = strdup(dsn);
>     ...
>     855     pos = strstr(self->dsn, "password");
>
> strdup could return a NULL.
>
> Admittedly this is probably a minor bug, but would it interest anyone if
> I report these somewhere?

Thank you for the review. Having patches would be even better, but I
will take care of this one.

Cheers

-- Daniele

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

Предыдущее
От: Brian Sutherland
Дата:
Сообщение: NULL dereference when memory is tight
Следующее
От: Jan Urbański
Дата:
Сообщение: register_hstore does DB queries, does not play well with async connections