diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-03-04 13:47:05 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-03-04 14:00:22 -0500 |
commit | 763b8f5d904517c3dffaaa43331a719c80d6e5b0 (patch) | |
tree | 3da7b38bea1f15ab28e6f78ddddb20c04d3c25ec /src | |
parent | 369c0b09080812943a2efcebe91cf4b271bc4f86 (diff) | |
download | postgresql-763b8f5d904517c3dffaaa43331a719c80d6e5b0.tar.gz postgresql-763b8f5d904517c3dffaaa43331a719c80d6e5b0.zip |
Fix SerializeSnapshot not to overrun the allocated space.
Rushabh Lathia
Diffstat (limited to 'src')
-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 2f0e9cda8c3..6ef2df8a20a 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); |