Fix SerializeSnapshot not to overrun the allocated space.

Rushabh Lathia
pull/11/head
Robert Haas 10 years ago
parent 0e7557dc8d
commit 17b124d303
  1. 2
      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);

Loading…
Cancel
Save