Commit dc74600c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Real pseudo-RTSP: prevent integer underflow

Pointed-out-by: tixxDZ <tixxdz@gmail.com> - DZCORE Labs, Algeria
parent 57e230c6
......@@ -600,6 +600,7 @@ int real_get_rdt_chunk(rtsp_client_t *rtsp_session, rmff_pheader_t *ph,
int n;
rmff_dump_pheader(ph, (char*)*buffer);
if (pf->length<12) return 0;
n=rtsp_read_data(rtsp_session, (uint8_t*)(*buffer + 12), ph->length - 12);
return (n <= 0) ? 0 : n+12;
}
......
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