<div dir="ltr"><p>---<br> modules/demux/adaptive/http/HTTPConnection.cpp | 14 ++++++++++----<br> 1 file changed, 10 insertions(+), 4 deletions(-)</p><p>diff --git a/modules/demux/adaptive/http/HTTPConnection.cpp b/modules/demux/adaptive/http/HTTPConnection.cpp<br>index 03156c6..0ebbd18 100644<br>--- a/modules/demux/adaptive/http/HTTPConnection.cpp<br>+++ b/modules/demux/adaptive/http/HTTPConnection.cpp<br>@@ -241,12 +241,18 @@ int HTTPConnection::parseReply()<br>     while(!line.empty() && line.compare("\r\n"))<br>     {<br>         size_t split = line.find_first_of(':');<br>-        size_t value = split + 1;<br>+        if(split != std::string::npos)<br>+        {<br>+            size_t value = split + 1;<br>+<br>+            while(value < line.size() && line[value] == ' ')<br>+                value++;<br> <br>-        while(<a href="http://line.at">line.at</a>(value) == ' ')<br>-            value++;<br>+            if(value > line.size())<br>+                value = line.size();<br>+            onHeader(line.substr(0, split), line.substr(value));<br>+        }<br> <br>-        onHeader(line.substr(0, split), line.substr(value));<br>         line = readLine();<br>     }<br> <br>-- <br>2.7.4<span><span><br></span></span></p></div>