diff options
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/plugins/DsdiffDecoderPlugin.cxx | 2 | ||||
-rw-r--r-- | src/decoder/plugins/OpusReader.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/plugins/DsdiffDecoderPlugin.cxx b/src/decoder/plugins/DsdiffDecoderPlugin.cxx index abb263486..6653f2053 100644 --- a/src/decoder/plugins/DsdiffDecoderPlugin.cxx +++ b/src/decoder/plugins/DsdiffDecoderPlugin.cxx @@ -205,7 +205,7 @@ dsdiff_handle_native_tag(InputStream &is, if (length == 0 || length > 60) return; - char string[length]; + char string[length + 1]; char *label; label = string; diff --git a/src/decoder/plugins/OpusReader.hxx b/src/decoder/plugins/OpusReader.hxx index b8a6083a6..4d11607cb 100644 --- a/src/decoder/plugins/OpusReader.hxx +++ b/src/decoder/plugins/OpusReader.hxx @@ -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); |