From 9bd58553fae5aef3e6dd22f51642d2c851225aec Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Wed, 31 May 2023 00:40:03 -0700 Subject: [PATCH] upnphttp: Fix chunk length parsing --- upnphttp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upnphttp.c b/upnphttp.c index 05b2020..477ebef 100644 --- a/upnphttp.c +++ b/upnphttp.c @@ -432,7 +432,7 @@ next_header: if (h->req_buflen <= h->req_contentoff) return; while( (line < (h->req_buf + h->req_buflen)) && - (h->req_chunklen = strtol(line, &endptr, 16) > 0) && + ((h->req_chunklen = strtol(line, &endptr, 16)) > 0) && (endptr != line) ) { endptr = strstr(endptr, "\r\n");