Commit 273d269d 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
(cherry picked from commit dc74600c)
parent 399df086
...@@ -592,6 +592,7 @@ int real_get_rdt_chunk(rtsp_client_t *rtsp_session, rmff_pheader_t *ph, ...@@ -592,6 +592,7 @@ int real_get_rdt_chunk(rtsp_client_t *rtsp_session, rmff_pheader_t *ph,
int n; int n;
rmff_dump_pheader(ph, (char*)*buffer); 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); n=rtsp_read_data(rtsp_session, (uint8_t*)(*buffer + 12), ph->length - 12);
return (n <= 0) ? 0 : n+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