diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 91128e1309..5d1c5a99f2 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; } }