[sr-dev] git:master:b356c734: http_async_client: null terminate the request id in the callback

Federico Cabiddu federico.cabiddu at gmail.com
Tue Sep 26 15:31:30 CEST 2017


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

Author: Federico Cabiddu <federico.cabiddu at gmail.com>
Committer: Federico Cabiddu <federico.cabiddu at gmail.com>
Date: 2017-09-26T15:33:42+02:00

http_async_client: null terminate the request id in the callback

---

Modified: src/modules/http_async_client/async_http.c

---

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

---

diff --git a/src/modules/http_async_client/async_http.c b/src/modules/http_async_client/async_http.c
index d86f8a68a0..000659cd29 100644
--- a/src/modules/http_async_client/async_http.c
+++ b/src/modules/http_async_client/async_http.c
@@ -192,6 +192,8 @@ void async_http_cb(struct http_m_reply *reply, void *param)
 	aq = param;
 	strncpy(q_id, aq->id, strlen(aq->id));
 	
+	q_id[strlen(aq->id)] = '\0';
+
 	act = (cfg_action_t*)aq->param;
 	cfg_update();
 




More information about the sr-dev mailing list