From 635ecb450c36f977eff9a8eb9b587476133b41a5 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 19 Jun 2018 13:32:15 +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 cb022e362..3a7a2c873 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;