aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/DsdLib.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-19 20:42:40 +0200
committerMax Kellermann <max@duempel.org>2014-08-19 20:42:40 +0200
commit67093a51435ba8bec1bc3d34b46d8f89504ce1c2 (patch)
treefc953997b8d6e164eeae3869c3844a5136529e5d /src/decoder/plugins/DsdLib.cxx
parent3f340168889cd7461ecd7faa6d599bc216f9faf0 (diff)
downloadmpd-67093a51435ba8bec1bc3d34b46d8f89504ce1c2.tar.gz
mpd-67093a51435ba8bec1bc3d34b46d8f89504ce1c2.tar.xz
mpd-67093a51435ba8bec1bc3d34b46d8f89504ce1c2.zip
decoder/DsdLib: use fixed-length ID3 buffer
Variable-length arrays are not allowed in C++.
Diffstat (limited to 'src/decoder/plugins/DsdLib.cxx')
-rw-r--r--src/decoder/plugins/DsdLib.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decoder/plugins/DsdLib.cxx b/src/decoder/plugins/DsdLib.cxx
index b1e8c776f..6cabf944d 100644
--- a/src/decoder/plugins/DsdLib.cxx
+++ b/src/decoder/plugins/DsdLib.cxx
@@ -127,10 +127,10 @@ dsdlib_tag_id3(InputStream &is,
count = size - offset;
/* 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;
- id3_byte_t dsdid3[count];
id3_byte_t *dsdid3data;
dsdid3data = dsdid3;