Skip to content

Commit

Permalink
free the nonce buffer after decryption
Browse files Browse the repository at this point in the history
  • Loading branch information
TTtie committed Nov 2, 2024
1 parent 1a911c3 commit 5054b5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/voice/VoiceConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,8 @@ class VoiceConnection extends EventEmitter {
data = Buffer.from(data.buffer);
}

nonce.free();

// RFC3550 5.1: Padding (may need testing)
if(hasPadding) {
const paddingAmount = data.subarray(0, data.length - 1);
Expand Down

0 comments on commit 5054b5e

Please sign in to comment.