diff mbox series

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

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

Checks

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(+)

Comments

Michael Niedermayer July 12, 2022, 6:22 p.m. UTC | #1
On Fri, May 20, 2022 at 01:43:12AM +0200, Michael Niedermayer wrote:
> 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(+)

will apply

[...]
diff mbox series

Patch

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;