aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-04-24 12:38:09 +0300
committerMartin Storsjö <martin@martin.st>2015-04-24 16:07:14 +0300
commitb90adb0aba073f9c1b4abca852119947393ced4c (patch)
treecaf2d8057d629146b61796878b6d42ecfabea9be
parent1bd2646a6da808f6f9881525771db098c54bc3d2 (diff)
downloadffmpeg-b90adb0aba073f9c1b4abca852119947393ced4c.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>
-rw-r--r--libavformat/rtsp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 1b60b4ff44..cbea685dcf 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -972,6 +972,8 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
p++;
reply->nb_transports++;
+ if (reply->nb_transports >= RTSP_MAX_TRANSPORTS)
+ break;
}
}