Module: kamailio Branch: 5.5 Commit: d96e3527c20791cb2291aa91685d5bc85606eb56 URL: https://github.com/kamailio/kamailio/commit/d96e3527c20791cb2291aa91685d5bc8...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2021-09-09T10:33:21+02:00
tm: skip body operation on empty string for uac building
(cherry picked from commit 34b61d3f1d6b5a0d4425f8edfa69d707cfa058b7)
---
Modified: src/modules/tm/t_msgbuilder.c
---
Diff: https://github.com/kamailio/kamailio/commit/d96e3527c20791cb2291aa91685d5bc8... Patch: https://github.com/kamailio/kamailio/commit/d96e3527c20791cb2291aa91685d5bc8...
---
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);