Commit 7f4c4333 authored by johan's avatar johan
Browse files

Check that the channel is fully initialised before forwarding packets to the state machine

parent 4eee27bb
......@@ -378,6 +378,11 @@ int bzrtp_processMessage(bzrtpContext_t *zrtpContext, uint32_t selfSSRC, uint8_t
/* check the context is initialised (we may receive packets before initialisation is complete i.e. between channel initialisation and channel start) */
if (zrtpChannelContext->stateMachine == NULL) {
return BZRTP_ERROR_INVALIDCONTEXT; /* drop the message */
/* first check the packet */
int retval;
bzrtpPacket_t *zrtpPacket = bzrtp_packetCheck(zrtpPacketString, zrtpPacketStringLength, zrtpChannelContext->peerSequenceNumber, &retval);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment