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

Martin Storsjö git at videolan.org
Mon Jun 1 12:33:21 CEST 2015


ffmpeg | branch: release/2.2 | Martin Storsjö <martin at martin.st> | Fri Apr 24 12:38:09 2015 +0300| [4c4cc9b27b69a86e405fd7612aa0a62f3b62b027] | committer: Reinhard Tartler

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>
(cherry picked from commit f77c9d71615e17414aacbb1720693b800a5a32d3)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>

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

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

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index b95be46..6f7d775 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -904,6 +904,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