Skip to content

Commit a939b57

Browse files
committed
fix bug in MtmNoticeReceiver
1 parent af45a5d commit a939b57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

multimaster.c

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

4599-
stripped_notice = palloc0(len);
4599+
stripped_notice = palloc0(len + 1);
46004600

46014601
if (*notice == 'N')
46024602
{
@@ -4612,7 +4612,7 @@ MtmNoticeReceiver(void *i, const PGresult *res)
46124612
}
46134613
else
46144614
{
4615-
stripped_notice = notice;
4615+
strncpy(stripped_notice, notice, len + 1);
46164616
MTM_ELOG(WARNING, "%s", stripped_notice);
46174617
}
46184618

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