Module: kamailio Branch: master Commit: 47a776efcd3d5c2ffafdd780fa169edc85e436d2 URL: https://github.com/kamailio/kamailio/commit/47a776efcd3d5c2ffafdd780fa169edc...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-03-26T22:29:27+01:00
http_client: check first if pointer is not exceeding limit
- then test its value not to be null char
---
Modified: modules/http_client/curlcon.c
---
Diff: https://github.com/kamailio/kamailio/commit/47a776efcd3d5c2ffafdd780fa169edc... Patch: https://github.com/kamailio/kamailio/commit/47a776efcd3d5c2ffafdd780fa169edc...
---
diff --git a/modules/http_client/curlcon.c b/modules/http_client/curlcon.c index aa61860..b38a352 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++;