diff mbox series

[FFmpeg-devel] avformat/rtsp: Use rtsp_st->stream_index

Message ID 20231025000943.25079-1-michael@niedermayer.cc
State Accepted
Commit e4d5ac8d7d2a08658b3db7dd821246fe6b35381f
Headers show
Series [FFmpeg-devel] avformat/rtsp: Use rtsp_st->stream_index | 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 Oct. 25, 2023, 12:09 a.m. UTC
Fixes: out of array access
Fixes: rtpdec_h264.c149/poc

Found-by: Hardik Shah of Vehere
Reviewed-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/rtsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index c4f78f97b0c..7d1d3a75d4c 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -410,7 +410,7 @@  static void parse_fmtp(AVFormatContext *s, RTSPState *rt,
         if (rtsp_st->sdp_payload_type == payload_type &&
             rtsp_st->dynamic_handler &&
             rtsp_st->dynamic_handler->parse_sdp_a_line) {
-            rtsp_st->dynamic_handler->parse_sdp_a_line(s, i,
+            rtsp_st->dynamic_handler->parse_sdp_a_line(s, rtsp_st->stream_index,
                 rtsp_st->dynamic_protocol_context, line);
         }
     }