From 8095a0da5405f4843a4156d0b0f1cf6dfec69067 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 8 Jan 2022 18:55:53 -0800 Subject: [PATCH] fix uninitialized memory getting treated as a mqtt address augmentAddrIntrnl() sets the has-mqtt bit in comms->addr but not the address data (has none). If that address had been loaded from stream the address bits will be random, not 0, and so get treated as an address. --- xwords4/common/comms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwords4/common/comms.c b/xwords4/common/comms.c index 58ab28d26..bcab76d68 100644 --- a/xwords4/common/comms.c +++ b/xwords4/common/comms.c @@ -681,7 +681,7 @@ comms_makeFromStream( MPFORMAL XWEnv xwe, XWStreamCtxt* stream, AddressRecord** prevsAddrNext; MsgQueueElem** prevsQueueNext; XP_U16 version = stream_getVersion( stream ); - CommsAddrRec addr; + CommsAddrRec addr = {0}; XP_U8 flags = stream_getU8( stream ); if ( version < STREAM_VERS_GICREATED ) {