From 34b61d3f1d6b5a0d4425f8edfa69d707cfa058b7 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Thu, 9 Sep 2021 10:25:29 +0200 Subject: [PATCH] tm: skip body operation on empty string for uac building --- src/modules/tm/t_msgbuilder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/tm/t_msgbuilder.c b/src/modules/tm/t_msgbuilder.c index ef9b45e2461..27aaef9b5fa 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);