[FFmpeg-cvslog] rtsp: Make sure we don' t write too many transport entries into a fixed-size array

Martin Storsjö git at videolan.org
Tue May 19 21:06:45 CEST 2015


ffmpeg | branch: release/2.4 | Martin Storsjö <martin at martin.st> | Fri Apr 24 12:38:09 2015 +0300| [f77c9d71615e17414aacbb1720693b800a5a32d3] | committer: Vittorio Giovara

rtsp: Make sure we don't write too many transport entries into a fixed-size array

CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f77c9d71615e17414aacbb1720693b800a5a32d3
---

 libavformat/rtsp.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 4e79bc1..3d040d3 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -927,6 +927,8 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
             p++;
 
         reply->nb_transports++;
+        if (reply->nb_transports >= RTSP_MAX_TRANSPORTS)
+            break;
     }
 }
 



More information about the ffmpeg-cvslog mailing list