From 47a776efcd3d5c2ffafdd780fa169edc85e436d2 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Sat, 26 Mar 2016 22:29:27 +0100 Subject: [PATCH] http_client: check first if pointer is not exceeding limit - then test its value not to be null char --- modules/http_client/curlcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/http_client/curlcon.c b/modules/http_client/curlcon.c index aa618602d38..b38a352f7a7 100644 --- a/modules/http_client/curlcon.c +++ b/modules/http_client/curlcon.c @@ -575,7 +575,7 @@ int fixup_raw_http_client_conn_list(void) schema.s = raw_cc->url.s; pos = schema.s; end = raw_cc->url.s + raw_cc->url.len; - while (pos != '\0' && (pos < end)) + while ((pos < end) && (*pos != '\0')) { if (*pos == ':') break; pos++;