From 8b5f47d3a327fb4fcc1fef6cb5c610a999aae82c Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Thu, 29 Jan 2015 08:20:14 +0100
Subject: [PATCH] decoder/DsdLib: raise ID3 tag limit to 1 MB

A bug report was submitted with a 600 kB ID3 tag that could not be
read by MPD.
---
 NEWS                           | 2 ++
 src/decoder/plugins/DsdLib.cxx | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 097da9199..ed6f0912e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
 ver 0.19.9 (not yet released)
+* decoder
+  - dsdiff, dsf: raise ID3 tag limit to 1 MB
 * fix build failure with uClibc
 * fix build failure on non-POSIX operating systems
 
diff --git a/src/decoder/plugins/DsdLib.cxx b/src/decoder/plugins/DsdLib.cxx
index 7321261f6..8ce1a94a3 100644
--- a/src/decoder/plugins/DsdLib.cxx
+++ b/src/decoder/plugins/DsdLib.cxx
@@ -125,7 +125,7 @@ dsdlib_tag_id3(InputStream &is,
 
 	const id3_length_t count = size - offset;
 
-	if (count < 10 || count > 256*1024)
+	if (count < 10 || count > 1024 * 1024)
 		return;
 
 	id3_byte_t *const id3_buf = static_cast<id3_byte_t*>(xalloc(count));