mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 05:17:26 +02:00
fix asserts, it's possible that we reach code only with 3 symbols
This happens when: * chunked encoding * body is empty * chunk has no extensions * and put calls are really weird
This commit is contained in:
committed by
Mohammad Nejati
parent
67b615ca29
commit
3461ad1a2b
@ -701,9 +701,12 @@ parse_chunk_header(char const*& p0,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(n >= 5);
|
BOOST_ASSERT(n >= 3);
|
||||||
if(f_ & flagExpectCRLF)
|
if(f_ & flagExpectCRLF)
|
||||||
|
{
|
||||||
|
BOOST_ASSERT(n >= 5);
|
||||||
BOOST_VERIFY(parse_crlf(p));
|
BOOST_VERIFY(parse_crlf(p));
|
||||||
|
}
|
||||||
std::uint64_t size;
|
std::uint64_t size;
|
||||||
BOOST_VERIFY(parse_hex(p, size));
|
BOOST_VERIFY(parse_hex(p, size));
|
||||||
eol = find_eol(p, pend, ec);
|
eol = find_eol(p, pend, ec);
|
||||||
|
Reference in New Issue
Block a user