<div dir="ltr">Hi Rémi,<div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 25, 2017 at 12:34 AM, Rémi Denis-Courmont <span dir="ltr"><<a href="mailto:remi@remlab.net" target="_blank">remi@remlab.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">Le tiistaina 18. heinäkuuta 2017, 14.59.40 EEST Zhao Zhili a écrit :<br>
> ---<br>
>  modules/demux/adaptive/http/<wbr>HTTPConnection.cpp | 14 ++++++++++----<br>
>  1 file changed, 10 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/modules/demux/adaptive/http/<wbr>HTTPConnection.cpp<br>
> 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" rel="noreferrer" target="_blank">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>
</div></div>The code is wrong, missing error handling. But the patch does not really seem<br>
to fix the real problem.<br>
<span class="gmail-HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>Thanks for your review! I'm trying to fix the most obvious bug which did lead to crash during test.<br></div><div>Do you mind to give me a hint on what's the real problem?<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-HOEnZb"><font color="#888888">
--<br>
雷米‧德尼-库尔蒙<br>
<a href="https://www.remlab.net/" rel="noreferrer" target="_blank">https://www.remlab.net/</a><br>
<br>
______________________________<wbr>_________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/vlc-devel</a></font></span></blockquote></div><br></div></div></div>