[MASSMAIL] Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема [MASSMAIL] Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)
Дата
Msg-id CAEudQApm0Kffq4GKLdyogyW1tVbkHOOqWTWg169OTsm1W=FUHg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Fix possible dereference null pointer (src/backend/replication/logical/reorderbuffer.c)
Список pgsql-hackers
Hi,

Per Coverity.

The function ReorderBufferTXNByXid,
can return NULL when the parameter *create* is false.

In the functions ReorderBufferSetBaseSnapshot
and ReorderBufferXidHasBaseSnapshot,
the second call to ReorderBufferTXNByXid,
pass false to *create* argument.

In the function ReorderBufferSetBaseSnapshot,
fixed passing true as argument to always return
a valid ReorderBufferTXN pointer.

In the function ReorderBufferXidHasBaseSnapshot,
fixed by checking if the pointer is NULL.

best regards,
Ranier Vilela
Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql: Greatly speed up "\d tablename" when not using regexes
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Table AM Interface Enhancements