<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 2:59 PM, Zhao Zhili <span dir="ltr"><<a href="mailto:wantlamy@gmail.com" target="_blank">wantlamy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><p>---<br> modules/demux/adaptive/http/<wbr>HTTPConnection.cpp | 14 ++++++++++----<br> 1 file changed, 10 insertions(+), 4 deletions(-)</p><p>diff --git a/modules/demux/adaptive/http/<wbr>HTTPConnection.cpp b/modules/demux/adaptive/http/<wbr>HTTPConnection.cpp<br>index 03156c6..0ebbd18 100644<br>--- a/modules/demux/adaptive/http/<wbr>HTTPConnection.cpp<br>+++ b/modules/demux/adaptive/http/<wbr>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" target="_blank">line.at</a>(value) == ' ')<br>- value++;<br>+ if(value > line.size())<br>+ value = line.size();<br></p></div></blockquote><div><br></div><div>Ping for review.</div><div><br></div><div>As of now, value > line.size() is always false. Should I remove this check or not?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><p>+ onHeader(line.substr(0, split), line.substr(value));<br>+ }<br> <br>- onHeader(line.substr(0, split), line.substr(value));<br> line = readLine();<br> }<span class="HOEnZb"><font color="#888888"><br> <br>-- <br>2.7.4<span><span><br></span></span></font></span></p></div>
</blockquote></div><br></div></div>