[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 Jul 20 10:48:08 CEST 2015


ffmpeg | branch: release/2.6 | Martin Storsjö <martin at martin.st> | Fri Apr 24 12:38:09 2015 +0300| [94a3d2e49caa23f9a9506b226ada1344a91ce24d] | committer: Michael Niedermayer

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

(cherry picked from commit b90adb0aba073f9c1b4abca852119947393ced4c)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 91128e1..5d1c5a9 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -964,6 +964,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