Browse code

tm: skip body operation on empty string for uac building

Daniel-Constantin Mierla authored on 09/09/2021 08:25:29
Showing 1 changed files
... ...
@@ -1637,7 +1637,7 @@ char* build_uac_req(str* method, str* headers, str* body, dlg_t* dialog,
1637 1637
 			memapp(w, CRLF, CRLF_LEN);
1638 1638
 	}
1639 1639
 	memapp(w, CRLF, CRLF_LEN);
1640
-	if (body) memapp(w, body->s, body->len);
1640
+	if (body && body->s && body->len>0) memapp(w, body->s, body->len);
1641 1641
 
1642 1642
 #ifdef EXTRA_DEBUG
1643 1643
 	assert(w-buf == *len);