Module: kamailio
Branch: master
Commit: 19dcb95c3b18be7cf538d38673c17a06583fd0e9
URL: 
https://github.com/kamailio/kamailio/commit/19dcb95c3b18be7cf538d38673c17a06583fd0e9

Author: Mikko Lehto <msle...@iki.fi>
Committer: Mikko Lehto <msle...@iki.fi>
Date: 2016-05-24T13:20:04+03:00

modules/http_client: fix NULL pointer dereference

---

Modified: modules/http_client/http_client.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/19dcb95c3b18be7cf538d38673c17a06583fd0e9.diff
Patch: 
https://github.com/kamailio/kamailio/commit/19dcb95c3b18be7cf538d38673c17a06583fd0e9.patch

---

diff --git a/modules/http_client/http_client.c 
b/modules/http_client/http_client.c
index 9a6c269..3efb0ee 100644
--- a/modules/http_client/http_client.c
+++ b/modules/http_client/http_client.c
@@ -508,6 +508,7 @@ static int w_curl_connect(struct sip_msg* _m, char* _con, 
char * _url, char* _re
 
        if (_con == NULL || _url == NULL || _result == NULL) {
                LM_ERR("Invalid parameter\n");
+               return -1;
        }
        con.s = _con;
        con.len = strlen(con.s);
@@ -546,6 +547,7 @@ static int w_curl_connect_post(struct sip_msg* _m, char* 
_con, char * _url, char
 
        if (_con == NULL || _url == NULL || _data == NULL || _result == NULL) {
                LM_ERR("Invalid parameter\n");
+               return -1;
        }
        con.s = _con;
        con.len = strlen(con.s);
@@ -782,6 +784,7 @@ static int w_curl_get_redirect(struct sip_msg* _m, char* 
_con, char* _result) {
 
        if (_con == NULL || _result == NULL) {
                LM_ERR("Invalid parameter\n");
+               return -1;
        }
        con.s = _con;
        con.len = strlen(con.s);


_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to