aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-04-24 12:38:09 +0300
committerReinhard Tartler <siretart@tauware.de>2015-05-31 11:11:30 -0400
commit4c4cc9b27b69a86e405fd7612aa0a62f3b62b027 (patch)
tree7983631447d0439655ae62be3bcb6630e253e7fc
parent1f1686615c20982a68b2d8db3ff109834a260d27 (diff)
downloadffmpeg-4c4cc9b27b69a86e405fd7612aa0a62f3b62b027.tar.gz
rtsp: Make sure we don't write too many transport entries into a fixed-size array
CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit f77c9d71615e17414aacbb1720693b800a5a32d3) Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r--libavformat/rtsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index b95be46f4f..6f7d7751d9 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;
}
}