Skip to content

Commit cacdcc5

Browse files
committed
Fix unligned access in parse commit record
1 parent 6efa28f commit cacdcc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/access/rmgrdesc/xactdesc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ParseCommitRecord(uint8 info, xl_xact_commit *xlrec, xl_xact_parsed_commit *pars
7979
uint8 gidlen = xl_twophase->gidlen;
8080

8181
parsed->twophase_xid = xl_twophase->xid;
82-
data += MinSizeOfXactTwophase;
82+
data += MAXALIGN(MinSizeOfXactTwophase);
8383

8484
strcpy(parsed->twophase_gid, data);
8585
data += MAXALIGN(gidlen);
@@ -169,7 +169,7 @@ ParseAbortRecord(uint8 info, xl_xact_abort *xlrec, xl_xact_parsed_abort *parsed)
169169
uint8 gidlen = xl_twophase->gidlen;
170170

171171
parsed->twophase_xid = xl_twophase->xid;
172-
data += MinSizeOfXactTwophase;
172+
data += MAXALIGN(MinSizeOfXactTwophase);
173173

174174
strcpy(parsed->twophase_gid, data);
175175
data += MAXALIGN(gidlen);

0 commit comments

Comments
 (0)