From patchwork Wed Oct 25 00:09:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 44353 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4999:b0:15d:8365:d4b8 with SMTP id fs25csp88487pzb; Tue, 24 Oct 2023 17:09:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNzA+E80+0kAbk+Ms8aUc3sU5o7WLYTNaVMbkYq0RE8fzwqRoJbAd0W28i7Tm8QWL9QN1b X-Received: by 2002:a17:906:ee81:b0:9be:9d5f:6967 with SMTP id wt1-20020a170906ee8100b009be9d5f6967mr11335335ejb.69.1698192596012; Tue, 24 Oct 2023 17:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698192595; cv=none; d=google.com; s=arc-20160816; b=esF+G+kBkRIcufBdAOeqaO8wtpI4AA59m7PY0c6u0UyZ5geQZUxqaoZ54+4srnBMgS r9qM95h+Zmu/ICLrWJc/rTX49mlBlALPRv3ITg+GgF/EaEcCmqpt5VhCpfzodyiIhWY2 +ihMZ9MKzXubi3I1NI+Ynl+8j2p4X5ws69WOGMtGcFyhFGRtSTgqGgBLYqR+Y21Zgd1i 6mJF96awx4y+PMS4izIEUK5EMIxG5pAq+5Z4/NCEaa6LvZ2frxPtVV7EHwv5eGCfCRTZ nugpSNzGvfXsUjuWNZTYbN5rT/7oZOjcBPBFD01DiOehAB5HqykekpVDxGjXX3XfioNJ QFBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=WCcv27FtI1djCktTvuQlpYBWF6/KJGGgpdl5KIK8rVw=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=mG7XxDpsC7WXhtrNNjcvLbgCohKRE7O99IG+GrJO+hI/NhJzu5Ilx1NZUEkA4p815k zTXn1ncDk5ChrJxt1AI9/OxE1t0kMY6OdZrHXh3e/KrJdoojfEx0mbbgrw5U5D9/3r2t D9So+fNjSMuuXsbszDo0Jlmj+k6NfMiZ6nA+9wTLZIAelODV26ksMdS2wLZNEPXSXUXu D06p4wh5z7EJkSLc8KWM2U8TbkVCRpyRKmUBZzDAIPa9ac1qwNrDUkgBxuU86sME5sBT gMgcpg/h1Vvav5z3NnP8M68QWtp0GMJ2pTmQeJ/ghRpXmjcRApsj8es0OpPN0eSr9DXO ljQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y24-20020a170906471800b009b99c845e1asi5092188ejq.674.2023.10.24.17.09.55; Tue, 24 Oct 2023 17:09:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4F40F68BE58; Wed, 25 Oct 2023 03:09:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A672268C8E7 for ; Wed, 25 Oct 2023 03:09:45 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B8FA920005 for ; Wed, 25 Oct 2023 00:09:44 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 25 Oct 2023 02:09:43 +0200 Message-Id: <20231025000943.25079-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH] avformat/rtsp: Use rtsp_st->stream_index X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: H8qCH+0LUtO/ Fixes: out of array access Fixes: rtpdec_h264.c149/poc Found-by: Hardik Shah of Vehere Reviewed-by: Martin Storsjö Signed-off-by: Michael Niedermayer --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }