Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion discord/voice_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def _decrypt_xsalsa20_poly1305_lite(self, header, data):

@staticmethod
def strip_header_ext(data):
if data[0] == 0xBE and data[1] == 0xDE and len(data) > 4:
if len(data) > 4 and data[0] == 0xBE and data[1] == 0xDE:
_, length = struct.unpack_from(">HH", data)
offset = 4 + length * 4
data = data[offset:]
Expand Down