From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 344734B59F for ; Sat, 8 Jun 2024 23:11:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 64CF568D734; Sun, 9 Jun 2024 02:10:59 +0300 (EEST) 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 6123E68D71A for ; Sun, 9 Jun 2024 02:10:51 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B35C420002 for ; Sat, 8 Jun 2024 23:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717888250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JMXzDQ+wpahqKd6EC+hiDT9ElWpo1+tRASzF6xAReS0=; b=iSkjzBkWyHH7MDE0PFod17PNo97/tfWzzCX6rNIoTtSxrVPDZzDObz77nQ5rtH3wm/1rWT YcceBeQ58JC8FswP70PuaiOXsKUf5rvLyvipq/z3jqzfxPGo+72xfEh++prpFJAwkRsbuY wLf2a3npQxNmj2MYB73onGKYtkuR3o0YMaXSU/d6TAYwWFft8G+kgVaapejWrctrYYfPLZ JbEXX+gTTsclIJnFoUf/7di6cFZ5W6cWY75Ndv7nXCX2Vh0gXAr+66gaNQi98g1fis1eno YHYfHQ0Wt0e6d3adCIREM2P3kqeKBzdvPBGxzvT28bYnyqG7LEOYJFa+LNHsgQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 9 Jun 2024 01:10:41 +0200 Message-ID: <20240608231046.3619551-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240608231046.3619551-1-michael@niedermayer.cc> References: <20240608231046.3619551-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/9] avformat/rtsp: Check that lower transport is handled in one of the if() 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: CID1473554 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/rtsp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index c6fca89d83f..19b93df8394 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1578,7 +1578,11 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, else if (lower_transport == RTSP_LOWER_TRANSPORT_UDP_MULTICAST) { snprintf(transport, sizeof(transport) - 1, "%s/UDP;multicast", trans_pref); + } else { + err = AVERROR(EINVAL); + goto fail; // transport would be uninitialized } + if (s->oformat) { av_strlcat(transport, ";mode=record", sizeof(transport)); } else if (rt->server_type == RTSP_SERVER_REAL || -- 2.45.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".