Fix chunk delimiter parsing

This commit is contained in:
Vinnie Falco committed 2017-07-20 08:12:18 -07:00
1 parent 96131eb243
commit 60a3221f0b
2 files changed
+7 -1

No files matched your search

+6 -1
View File
@@ -512,11 +512,16 @@ parse_chunk_header(char const*& p,
// be parsed in one call instead of two.
if(f_ & flagExpectCRLF)
{
if(n < 2 || ! parse_crlf(p))
if(n < 2)
{
ec = error::need_more;
return;
}
if(! parse_crlf(p))
{
ec = error::bad_chunk;
return;
}
f_ &= ~flagExpectCRLF;
pbegin += 2;
n -= 2;