[PATCH] Possible NULL deref in str_time

Поиск
Список
Период
Сортировка
От Bill Moyers
Тема [PATCH] Possible NULL deref in str_time
Дата
Msg-id 71cfc8d9-32d8-2052-8f80-3beeb3831071@agora-net.com
обсуждение исходный текст
Список pgsql-hackers
I noticed that the output of pg_localtime() in str_time() is not checked 
and can sometimes return NULL. It's pretty unlikely to occur, I guess if 
the time() function was acting funny. For example if I define this:

time_t
fake_time(void *blah)
{
     return 0x0110000000000000;
}

and then call fake_time() instead of time() everywhere, then str_time() 
does the NULL dereference at startup.

* possible-null-deref-in-str_time.patch

Check the pg_localtime() output. This should not have a performance 
impact because this function is not called often.

Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: [HACKERS] pg_upgrade failed with error - ERROR: column "a" inchild table must be marked NOT NULL
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Transactions involving multiple postgres foreign servers