Module: kamailio Branch: master Commit: 34b61d3f1d6b5a0d4425f8edfa69d707cfa058b7 URL: https://github.com/kamailio/kamailio/commit/34b61d3f1d6b5a0d4425f8edfa69d707...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-09-09T10:25:29+02:00
tm: skip body operation on empty string for uac building
---
Modified: src/modules/tm/t_msgbuilder.c
---
Diff: https://github.com/kamailio/kamailio/commit/34b61d3f1d6b5a0d4425f8edfa69d707... Patch: https://github.com/kamailio/kamailio/commit/34b61d3f1d6b5a0d4425f8edfa69d707...
---
diff --git a/src/modules/tm/t_msgbuilder.c b/src/modules/tm/t_msgbuilder.c index ef9b45e246..27aaef9b5f 100644 --- a/src/modules/tm/t_msgbuilder.c +++ b/src/modules/tm/t_msgbuilder.c @@ -1637,7 +1637,7 @@ char* build_uac_req(str* method, str* headers, str* body, dlg_t* dialog, memapp(w, CRLF, CRLF_LEN); } memapp(w, CRLF, CRLF_LEN); - if (body) memapp(w, body->s, body->len); + if (body && body->s && body->len>0) memapp(w, body->s, body->len);
#ifdef EXTRA_DEBUG assert(w-buf == *len);