Module: kamailio Branch: master Commit: 179a6e699a1021efa55d1ea097ceeb7a12575cc5 URL: https://github.com/kamailio/kamailio/commit/179a6e699a1021efa55d1ea097ceeb7a...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-08-08T10:08:10+02:00
tm: terminate local uac buffers with 0
- received message buffer is terminated with 0 and many functions expect that, so use of them in event_route[tm:local-request] may have ended up in wrong behavior
---
Modified: src/modules/tm/t_msgbuilder.c
---
Diff: https://github.com/kamailio/kamailio/commit/179a6e699a1021efa55d1ea097ceeb7a... Patch: https://github.com/kamailio/kamailio/commit/179a6e699a1021efa55d1ea097ceeb7a...
---
diff --git a/src/modules/tm/t_msgbuilder.c b/src/modules/tm/t_msgbuilder.c index c4ab254076..feb7513bfd 100644 --- a/src/modules/tm/t_msgbuilder.c +++ b/src/modules/tm/t_msgbuilder.c @@ -1633,6 +1633,8 @@ char* build_uac_req(str* method, str* headers, str* body, dlg_t* dialog, assert(w-buf == *len); #endif
+ memapp(w, "\0", 1); + pkg_free(via.s); return buf;