Commit 17b124d3 authored by Robert Haas's avatar Robert Haas

Fix SerializeSnapshot not to overrun the allocated space.

Rushabh Lathia
parent 0e7557dc
...@@ -1515,7 +1515,7 @@ SerializeSnapshot(Snapshot snapshot, char *start_address) ...@@ -1515,7 +1515,7 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
* snapshot taken during recovery; all the top-level XIDs are in subxip as * snapshot taken during recovery; all the top-level XIDs are in subxip as
* well in that case, so we mustn't lose them. * well in that case, so we mustn't lose them.
*/ */
if (snapshot->subxcnt > 0) if (serialized_snapshot->subxcnt > 0)
{ {
Size subxipoff = sizeof(SerializedSnapshotData) + Size subxipoff = sizeof(SerializedSnapshotData) +
snapshot->xcnt * sizeof(TransactionId); snapshot->xcnt * sizeof(TransactionId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment