Skip to content

Commit 9c099ec

Browse files
committed
use brand new verlen gid
1 parent 36bec4d commit 9c099ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/access/transam/twophase.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,8 @@ ParsePrepareRecord(uint8 info, char *xlrec, xl_xact_parsed_prepare *parsed)
12551255
parsed->nrels = hdr->ncommitrels;
12561256
parsed->nmsgs = hdr->ninvalmsgs;
12571257

1258-
strcpy(parsed->twophase_gid, hdr->gid);
1258+
strncpy(parsed->twophase_gid, bufptr, hdr->gidlen);
1259+
bufptr += MAXALIGN(hdr->gidlen);
12591260

12601261
parsed->subxacts = (TransactionId *) bufptr;
12611262
bufptr += MAXALIGN(hdr->nsubxacts * sizeof(TransactionId));

0 commit comments

Comments
 (0)