aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-04-24 12:38:09 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-05-21 20:43:39 +0200
commit6b7c6218393082bf6c91f08944a6d2087e2170e7 (patch)
tree3a5fffa6dd863320104c92bd520b3834372ce272
parent3d65a272dab66329effd628533bcbbc67af73bf8 (diff)
downloadffmpeg-6b7c6218393082bf6c91f08944a6d2087e2170e7.tar.gz
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@gmx.at>
-rw-r--r--libavformat/rtsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index ae62252a22..6b9b544256 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -931,6 +931,8 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
p++;
reply->nb_transports++;
+ if (reply->nb_transports >= RTSP_MAX_TRANSPORTS)
+ break;
}
}