We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ae8d72 commit 1038542Copy full SHA for 1038542
contrib/mmts/multimaster.c
@@ -4582,7 +4582,7 @@ MtmNoticeReceiver(void *i, const PGresult *res)
4582
if ( (*(int *)i) != MtmNodeId - 1)
4583
return;
4584
4585
- stripped_notice = palloc0(len);
+ stripped_notice = palloc0(len + 1);
4586
4587
if (*notice == 'N')
4588
{
@@ -4598,7 +4598,7 @@ MtmNoticeReceiver(void *i, const PGresult *res)
4598
}
4599
else
4600
4601
- stripped_notice = notice;
+ strncpy(stripped_notice, notice, len + 1);
4602
MTM_ELOG(WARNING, "%s", stripped_notice);
4603
4604
0 commit comments