summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-09-27 22:58:55 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-09-27 23:01:03 -0400
commita156fdbc7bb00f1ead9df41038062efd7b829105 (patch)
treeae008ca81d377c7a679daecfd3df522c9b4c16de
parentcbb5ee621cf754f03ae7805ce5afc9782fe539ea (diff)
downloadlighttpd-git-a156fdbc7bb00f1ead9df41038062efd7b829105.tar.gz
[core] fix triggered assert on HTTP chunked input (fixes #2822)
(thx AlxT) x-ref: "Segmentation fault on HTTP chunked input" https://redmine.lighttpd.net/issues/2822
-rw-r--r--src/connections-glue.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/connections-glue.c b/src/connections-glue.c
index 9f451e3f..171a36b9 100644
--- a/src/connections-glue.c
+++ b/src/connections-glue.c
@@ -125,6 +125,7 @@ static handler_t connection_handle_read_post_chunked(server *srv, connection *co
while (0 == te_chunked) {
char *p;
chunk *c = cq->first;
+ if (NULL == c) break;
force_assert(c->type == MEM_CHUNK);
p = strchr(c->mem->ptr+c->offset, '\n');
if (NULL != p) { /* found HTTP chunked header line */