mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Fix segfault: uninitialized identifiers w/ &synchronized (addresses #66)
Synchronization of state between connecting peers now skips over identifiers that aren't initialized with a value yet. If they're assigned a value later, that will be synchronized like usual.
This commit is contained in:
parent
32239ea633
commit
f403e537ec
4 changed files with 18 additions and 3 deletions
|
@ -1032,6 +1032,14 @@ bool RemoteSerializer::SendAllSynchronized(Peer* peer, SerialInfo* info)
|
|||
|
||||
for ( ; index < sync_ids.length(); ++index )
|
||||
{
|
||||
if ( ! sync_ids[index]->ID_Val() )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
DBG_LOG(DBG_COMM, "Skip sync of ID with null value: %s\n",
|
||||
sync_ids[index]->Name());
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
cont->SaveContext();
|
||||
|
||||
StateAccess sa(OP_ASSIGN, sync_ids[index],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue