From 67093a51435ba8bec1bc3d34b46d8f89504ce1c2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Aug 2014 20:42:40 +0200 Subject: decoder/DsdLib: use fixed-length ID3 buffer Variable-length arrays are not allowed in C++. --- src/decoder/plugins/DsdLib.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/decoder/plugins/DsdLib.cxx') 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; -- cgit v1.2.3