diff --git a/src/AudioStream.c b/src/AudioStream.c index 6f5f8a0..6874210 100644 --- a/src/AudioStream.c +++ b/src/AudioStream.c @@ -78,6 +78,7 @@ int initializeAudioStream(void) { int err = PltCreateThread("AudioPing", UdpPingThreadProc, NULL, &udpPingThread); if (err != 0) { closeSocket(rtpSocket); + rtpSocket = INVALID_SOCKET; return err; } diff --git a/src/ControlStream.c b/src/ControlStream.c index c5f8324..05dddf3 100644 --- a/src/ControlStream.c +++ b/src/ControlStream.c @@ -489,7 +489,8 @@ static bool decryptControlMessageToV1(PNVCTL_ENCRYPTED_PACKET_HEADER encPacket, goto gcm_cleanup; } - // GCM encryption won't ever fill ciphertext here but we have to call it anyway + // GCM will never have additional plaintext here, but we need to call it to + // ensure that the GCM authentication tag is correct for this data. if (EVP_DecryptFinal_ex(cipherContext, (unsigned char*)*packet, &len) != 1) { goto gcm_cleanup; } @@ -861,7 +862,6 @@ static void controlReceiveThreadFunc(void* context) { } } - // We used to wait for a ENET_EVENT_TYPE_DISCONNECT event, but since // GFE 3.20.3.63 we don't get one for 10 seconds after we first get // this termination message. The termination message should be reliable