summaryrefslogtreecommitdiffstats
path: root/stream/realrtsp/real.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/realrtsp/real.c')
-rw-r--r--stream/realrtsp/real.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index d81b265bab..b8f943c8e0 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -382,10 +382,14 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) {
ph.flags=0;
*buffer = xbuffer_ensure_size(*buffer, 12+size);
if(rdt_rawdata) {
+ if (size < 12)
+ return 0;
n=rtsp_read_data(rtsp_session, *buffer, size-12);
return (n <= 0) ? 0 : n;
}
rmff_dump_pheader(&ph, *buffer);
+ if (size < 12)
+ return 0;
size-=12;
n=rtsp_read_data(rtsp_session, (*buffer)+12, size);