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);