Skip to content

Commit 1038542

Browse files
committed
fix bug in MtmNoticeReceiver
1 parent 6ae8d72 commit 1038542

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/mmts/multimaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4582,7 +4582,7 @@ MtmNoticeReceiver(void *i, const PGresult *res)
45824582
if ( (*(int *)i) != MtmNodeId - 1)
45834583
return;
45844584

4585-
stripped_notice = palloc0(len);
4585+
stripped_notice = palloc0(len + 1);
45864586

45874587
if (*notice == 'N')
45884588
{
@@ -4598,7 +4598,7 @@ MtmNoticeReceiver(void *i, const PGresult *res)
45984598
}
45994599
else
46004600
{
4601-
stripped_notice = notice;
4601+
strncpy(stripped_notice, notice, len + 1);
46024602
MTM_ELOG(WARNING, "%s", stripped_notice);
46034603
}
46044604

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy