pgsql: Fix unsafe coding in ReorderBufferCommit().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Fix unsafe coding in ReorderBufferCommit().
Дата
Msg-id E1YF5Or-0004c8-Or@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix unsafe coding in ReorderBufferCommit().

"iterstate" must be marked volatile since it's changed inside the PG_TRY
block and then used in the PG_CATCH stanza.  Noted by Mark Wilding of
Salesforce.  (We really need to see if we can't get the C compiler to warn
about this.)

Also, reset iterstate to NULL after the mainline ReorderBufferIterTXNFinish
call, to ensure the PG_CATCH block doesn't try to do that a second time.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/91964c3ed1c49d9a8670d3f85a660181cc541c7c

Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c |    7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Replace a bunch more uses of strncpy() with safer coding.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix unsafe coding in ReorderBufferCommit().