diff --git a/src/switch_msrp.c b/src/switch_msrp.c index 81c9cd0638..d3b1506aa5 100644 --- a/src/switch_msrp.c +++ b/src/switch_msrp.c @@ -1288,6 +1288,8 @@ static void *SWITCH_THREAD_FUNC msrp_worker(switch_thread_t *thread, void *obj) if (p + len > last_p) { // unparsed msg in buffer p += len; + len = MSRP_BUFF_SIZE - (p - buf); + if (!msrp_msg) { int rest_len = p - last_p;