Commit 8fff73b5 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed crash in rtcp_get_common_header if mblk_t is NULL

parent d4ed966e
......@@ -46,14 +46,14 @@ void rtcp_rewind(mblk_t *m){
const rtcp_common_header_t * rtcp_get_common_header(const mblk_t *m){
size_t size=msgdsize(m);
rtcp_common_header_t *ch;
if (m->b_cont!=NULL){
ortp_fatal("RTCP parser does not work on fragmented mblk_t. Use msgpullup() before to re-assemble the packet.");
return NULL;
}
if (size<sizeof(rtcp_common_header_t)){
ortp_warning("Bad RTCP packet, too short [%i b]. on block [%p]",(int)size,m);
return NULL;
}
if (m->b_cont!=NULL){
ortp_fatal("RTCP parser does not work on fragmented mblk_t. Use msgpullup() before to re-assemble the packet.");
return NULL;
}
ch=(rtcp_common_header_t*)m->b_rptr;
return ch;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment