diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-03-04 13:47:05 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-03-04 13:48:36 -0500 |
commit | 17b124d30317eb194dc8b2fa86b1ebc5b09ac8f3 (patch) | |
tree | 15de182611124223eddc85138ff06d77f687adad | |
parent | 0e7557dc8d5b2008b0b096cd730d16c8562690fc (diff) |
Fix SerializeSnapshot not to overrun the allocated space.
Rushabh Lathia
-rw-r--r-- | src/backend/utils/time/snapmgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index 63e908d0a00..b88e0120041 100644 --- a/src/backend/utils/time/snapmgr.c +++ b/src/backend/utils/time/snapmgr.c @@ -1515,7 +1515,7 @@ SerializeSnapshot(Snapshot snapshot, char *start_address) * snapshot taken during recovery; all the top-level XIDs are in subxip as * well in that case, so we mustn't lose them. */ - if (snapshot->subxcnt > 0) + if (serialized_snapshot->subxcnt > 0) { Size subxipoff = sizeof(SerializedSnapshotData) + snapshot->xcnt * sizeof(TransactionId); |