From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix unsafe coding in ReorderBufferCommit(). |
Date: | 2015-01-24 18:25:37 |
Message-ID: | E1YF5Or-0004c7-Ol@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/f8a4dd2e141a12e349882edecc683504acb82ec8
Modified Files
--------------
src/backend/replication/logical/reorderbuffer.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-01-24 21:16:31 | pgsql: Clean up some mess in row-security patches. |
Previous Message | Tom Lane | 2015-01-24 18:06:24 | pgsql: Replace a bunch more uses of strncpy() with safer coding. |