decoder/opus: limit tag size to 64 kB

This commit is contained in:
Max Kellermann
2016-03-06 23:26:48 +01:00
parent bbda335e02
commit 976fdd76c1
2 changed files with 3 additions and 1 deletions

View File

@@ -85,7 +85,7 @@ public:
char *ReadString() {
uint32_t length;
if (!ReadWord(length))
if (!ReadWord(length) || length >= 65536)
return nullptr;
const char *src = (const char *)Read(length);