[sr-dev] git:master:e3d00a22: http_async_client: ensure username and password initialized

Giacomo Vacca giacomo.vacca at gmail.com
Thu Dec 22 06:24:13 CET 2016


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

Author: Giacomo Vacca <giacomo.vacca at gmail.com>
Committer: Giacomo Vacca <giacomo.vacca at gmail.com>
Date: 2016-12-21T21:12:40+01:00

http_async_client: ensure username and password initialized

---

Modified: src/modules/http_async_client/async_http.c

---

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

---

diff --git a/src/modules/http_async_client/async_http.c b/src/modules/http_async_client/async_http.c
index e7089f1..f4b248d 100644
--- a/src/modules/http_async_client/async_http.c
+++ b/src/modules/http_async_client/async_http.c
@@ -281,6 +281,7 @@ void notification_socket_cb(int fd, short event, void *arg)
 		}
 	}
   
+	query_params.username = NULL;
 	if (aq->query_params.username) {
 		len = strlen(aq->query_params.username);
 		query_params.username = shm_malloc(len+1);
@@ -294,6 +295,7 @@ void notification_socket_cb(int fd, short event, void *arg)
 		query_params.username[len] = '\0';
 	}
 	
+	query_params.password = NULL;
 	if (aq->query_params.password) {
 		len = strlen(aq->query_params.password);
 		query_params.password = shm_malloc(len+1);




More information about the sr-dev mailing list