summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stream/realrtsp/real.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/stream/realrtsp/real.c b/stream/realrtsp/real.c
index 9f01a5dfb0..2e2b8cd9ca 100644
--- a/stream/realrtsp/real.c
+++ b/stream/realrtsp/real.c
@@ -386,6 +386,8 @@ int real_get_rdt_chunk(rtsp_t *rtsp_session, char **buffer, int rdt_rawdata) {
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);