From 452a30d7afeaf5ed641a1f9100349c8a5c32753b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Jan 2013 23:39:32 +0100 Subject: input/Curl: break loop when remaining length becomes 0 Fixes assertion failure (regression). --- src/input/CurlInputPlugin.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/input/CurlInputPlugin.cxx b/src/input/CurlInputPlugin.cxx index 1b852b900..29d8266ce 100644 --- a/src/input/CurlInputPlugin.cxx +++ b/src/input/CurlInputPlugin.cxx @@ -776,6 +776,9 @@ read_from_buffer(IcyMetaDataParser &icy, std::list &buffers, buffers.pop_front(); break; } + + if (length == 0) + break; } chunk = icy.Meta(buffer.Begin(), length); @@ -788,6 +791,9 @@ read_from_buffer(IcyMetaDataParser &icy, std::list &buffers, buffers.pop_front(); break; } + + if (length == 0) + break; } } -- cgit v1.2.3