From e9d178286395ea7372b48c5a99ac4c9bf745d1e2 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 19 Jun 2018 12:19:10 +0800 Subject: [PATCH] http: skip NULs between fragments --- lib/roles/http/server/parsers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roles/http/server/parsers.c b/lib/roles/http/server/parsers.c index 31851862e..bc2ed42bf 100644 --- a/lib/roles/http/server/parsers.c +++ b/lib/roles/http/server/parsers.c @@ -789,7 +789,7 @@ lws_parse_urldecode(struct lws *wsi, uint8_t *_c) ah->nfrag++; if (ah->nfrag >= ARRAY_SIZE(ah->frags)) goto excessive; - ah->frags[ah->nfrag].offset = ah->pos; + ah->frags[ah->nfrag].offset = ++ah->pos; ah->frags[ah->nfrag].len = 0; ah->frags[ah->nfrag].nfrag = 0;