Minor cleanup and bugfix

This commit is contained in:
Cameron Gutman 2021-04-09 13:47:24 -05:00
parent 83431e557d
commit 31433fc5ee
2 changed files with 3 additions and 2 deletions

View File

@ -78,6 +78,7 @@ int initializeAudioStream(void) {
int err = PltCreateThread("AudioPing", UdpPingThreadProc, NULL, &udpPingThread); int err = PltCreateThread("AudioPing", UdpPingThreadProc, NULL, &udpPingThread);
if (err != 0) { if (err != 0) {
closeSocket(rtpSocket); closeSocket(rtpSocket);
rtpSocket = INVALID_SOCKET;
return err; return err;
} }

View File

@ -489,7 +489,8 @@ static bool decryptControlMessageToV1(PNVCTL_ENCRYPTED_PACKET_HEADER encPacket,
goto gcm_cleanup; 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) { if (EVP_DecryptFinal_ex(cipherContext, (unsigned char*)*packet, &len) != 1) {
goto gcm_cleanup; 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 // 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 // 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 // this termination message. The termination message should be reliable