Module: kamailio
Branch: master
Commit: 47a776efcd3d5c2ffafdd780fa169edc85e436d2
URL: 
https://github.com/kamailio/kamailio/commit/47a776efcd3d5c2ffafdd780fa169edc85e436d2

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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/47a776efcd3d5c2ffafdd780fa169edc85e436d2.diff
Patch: 
https://github.com/kamailio/kamailio/commit/47a776efcd3d5c2ffafdd780fa169edc85e436d2.patch

---

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++;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to