Commit 67093a51 authored by Max Kellermann's avatar Max Kellermann

decoder/DsdLib: use fixed-length ID3 buffer

Variable-length arrays are not allowed in C++.
parent 3f340168
...@@ -127,10 +127,10 @@ dsdlib_tag_id3(InputStream &is, ...@@ -127,10 +127,10 @@ dsdlib_tag_id3(InputStream &is,
count = size - offset; count = size - offset;
/* Check and limit id3 tag size to prevent a stack overflow */ /* Check and limit id3 tag size to prevent a stack overflow */
if (count == 0 || count > 4096) id3_byte_t dsdid3[4096];
if (count == 0 || count > sizeof(dsdid3))
return; return;
id3_byte_t dsdid3[count];
id3_byte_t *dsdid3data; id3_byte_t *dsdid3data;
dsdid3data = dsdid3; dsdid3data = dsdid3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment