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)
|
||||
{
|
||||
*header_size = newline - buf.begin;
|
||||
// the newline alone is two bytes
|
||||
TORRENT_ASSERT(newline - buf.begin > 2);
|
||||
// the newline is at least 1 byte, and the length-prefix is at least 1
|
||||
// byte
|
||||
TORRENT_ASSERT(newline - buf.begin >= 2);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue