forked from premiere/premiere-libtorrent
back-port fixed assert in chunk parser
This commit is contained in:
parent
62bf524e75
commit
47709244d3
|
@ -476,8 +476,9 @@ restart_response:
|
||||||
if (*chunk_size != 0)
|
if (*chunk_size != 0)
|
||||||
{
|
{
|
||||||
*header_size = newline - buf.begin;
|
*header_size = newline - buf.begin;
|
||||||
// the newline alone is two bytes
|
// the newline is at least 1 byte, and the length-prefix is at least 1
|
||||||
TORRENT_ASSERT(newline - buf.begin > 2);
|
// byte
|
||||||
|
TORRENT_ASSERT(newline - buf.begin >= 2);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue