[sr-dev] git:master:74215ac1: http_client: fixed safety check looking up var names

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 8 09:39:44 CET 2017


Module: kamailio
Branch: master
Commit: 74215ac16878cc00cf29ae0fc89dfc9aa9ed9399
URL: https://github.com/kamailio/kamailio/commit/74215ac16878cc00cf29ae0fc89dfc9aa9ed9399

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-12-08T09:07:40+01:00

http_client: fixed safety check looking up var names

---

Modified: src/modules/http_client/http_client.c

---

Diff:  https://github.com/kamailio/kamailio/commit/74215ac16878cc00cf29ae0fc89dfc9aa9ed9399.diff
Patch: https://github.com/kamailio/kamailio/commit/74215ac16878cc00cf29ae0fc89dfc9aa9ed9399.patch

---

diff --git a/src/modules/http_client/http_client.c b/src/modules/http_client/http_client.c
index 4a19be6b18..9b8abc984d 100644
--- a/src/modules/http_client/http_client.c
+++ b/src/modules/http_client/http_client.c
@@ -561,7 +561,7 @@ static int ki_curl_connect(sip_msg_t *_m, str *con, str *url, str *dpv)
 	pv_spec_t *dst;
 
 	dst = pv_cache_get(dpv);
-	if(dpv==NULL) {
+	if(dst==NULL) {
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		return -1;
 	}
@@ -635,7 +635,7 @@ static int ki_curl_connect_post(sip_msg_t *_m, str *con, str *url,
 	pv_spec_t *dst;
 
 	dst = pv_cache_get(dpv);
-	if(dpv==NULL) {
+	if(dst==NULL) {
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		return -1;
 	}
@@ -810,7 +810,7 @@ static int ki_http_query_post_hdrs(sip_msg_t *_m, str *url, str *post, str *hdrs
 	pv_spec_t *dst;
 
 	dst = pv_cache_get(dpv);
-	if(dpv==NULL) {
+	if(dst==NULL) {
 		LM_ERR("failed to get pv spec for: %.*s\n", dpv->len, dpv->s);
 		return -1;
 	}




More information about the sr-dev mailing list