diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-05-20 00:50:33 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-10-28 21:04:04 +0200 |
commit | 45362629004ba621bab5c0a1358b8f36702c0c2f (patch) | |
tree | 708c53cd02cf298bd3863f9972134ef1415b7115 | |
parent | b67955889c38c34b2e850b001e8be4b9593f4d0c (diff) | |
download | ffmpeg-45362629004ba621bab5c0a1358b8f36702c0c2f.tar.gz |
avformat/rtsp: break on unknown protocols
This function needs more cleanup and it lacks error handling
Fixes: use of uninitialized memory
Fixes: CID700776
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 73c0fd27c5c53c42e5060fb3a0c1fc5708b6f670)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/rtsp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 05b026a30d..064e50e40f 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -908,6 +908,8 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p) ";,", &p); } th->transport = RTSP_TRANSPORT_RAW; + } else { + break; } if (!av_strcasecmp(lower_transport, "TCP")) th->lower_transport = RTSP_LOWER_TRANSPORT_TCP; |