diff options
author | Max Kellermann <max@duempel.org> | 2013-01-15 23:39:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-15 23:39:32 +0100 |
commit | 452a30d7afeaf5ed641a1f9100349c8a5c32753b (patch) | |
tree | 1018405823eb91e8e5fc80a1cc371b5db81ff890 /src/input/CurlInputPlugin.cxx | |
parent | 49e79620fd12e08e40b56a46872ebcefdb75c123 (diff) | |
download | mpd-452a30d7afeaf5ed641a1f9100349c8a5c32753b.tar.gz mpd-452a30d7afeaf5ed641a1f9100349c8a5c32753b.tar.xz mpd-452a30d7afeaf5ed641a1f9100349c8a5c32753b.zip |
input/Curl: break loop when remaining length becomes 0
Fixes assertion failure (regression).
Diffstat (limited to 'src/input/CurlInputPlugin.cxx')
-rw-r--r-- | src/input/CurlInputPlugin.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
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<CurlInputBuffer> &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<CurlInputBuffer> &buffers, buffers.pop_front(); break; } + + if (length == 0) + break; } } |