Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 17b124d

Browse files
committed
Fix SerializeSnapshot not to overrun the allocated space.
Rushabh Lathia
1 parent 0e7557d commit 17b124d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/time/snapmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1515,7 +1515,7 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
15151515
* snapshot taken during recovery; all the top-level XIDs are in subxip as
15161516
* well in that case, so we mustn't lose them.
15171517
*/
1518-
if (snapshot->subxcnt > 0)
1518+
if (serialized_snapshot->subxcnt > 0)
15191519
{
15201520
Size subxipoff = sizeof(SerializedSnapshotData) +
15211521
snapshot->xcnt * sizeof(TransactionId);

0 commit comments

Comments
 (0)