diff mbox series

[FFmpeg-devel,2/2] avformat/rtsp: break on unknown protocols

Message ID 20220519234312.11733-2-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/2] avformat/matroskadec: assert non NULL buf | expand


Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer May 19, 2022, 11:43 p.m. UTC
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>
 libavformat/rtsp.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series


diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 88e9ef5226..f948f1d395 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -949,6 +949,8 @@  static void rtsp_parse_transport(AVFormatContext *s,
                              ";,", &p);
             th->transport = RTSP_TRANSPORT_RAW;
+        } else {
+            break;
         if (!av_strcasecmp(lower_transport, "TCP"))
             th->lower_transport = RTSP_LOWER_TRANSPORT_TCP;