Merge pull request #1341 from lnksz/bugfix-1340-http_chunked

Fix #1340: Long HTTP Chunks
This commit is contained in:
Sergey Lyubka authored and GitHub committed 2021-08-23 14:50:39 +01:00
commit 9b37ac384f
3 files changed
+10 -6

No files matched your search

+1 -1
View File
@@ -854,7 +854,7 @@ static void walkchunks(struct mg_connection *c, struct mg_http_message *hm,
char *buf2 = (char *) &c->recv.buf[reqlen];
size_t memo2 = c->recv.len;
size_t cl2 = get_chunk_length(&buf2[off], memo2 - reqlen - off, &ll);
size_t n = cl < ll + 2 ? 0 : cl2 - ll - 2;
size_t n = cl2 < ll + 2 ? 0 : cl2 - ll - 2;
memmove(buf2 + bl, buf2 + off + ll, n);
bl += n;
off += cl2;