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.
This commit is contained in:
Eric House 2022-01-08 18:55:53 -08:00
parent e5a6f05e92
commit 8095a0da54

View file

@ -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 ) {