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 507E74B052 for ; Sun, 26 May 2024 23:54:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9B70768D5D9; Mon, 27 May 2024 02:52:55 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ACBF968D590 for ; Mon, 27 May 2024 02:52:44 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id E5A391BF204 for ; Sun, 26 May 2024 23:52:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716767564; 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=dgVhXFpcn4upS6Ofev6q1EsxPrPfFy5nzDjPKntVbG0=; b=pDaVuZ2AtY8r7/4ix8dB0ouEg3JYKJP8dIfHwOH0+G5ZGk09oKfr6u6bk6hHYdoogodsVY DBCj4InEHWcRhdrbysmxaKzpmbtr5b5N3uvc2bDT/STvxEjWXcnghqBEtX3jAN8Z3qbt60 OgvPf2V0tuQs75GvtlMtl+zHZA4uIkjMrGDuz7G7uuRrs6d84apv6x7Ql9aaE7F3JJnZvk pDaikX2+6vkm47XA80XdTKfFz8wXtHptr0Ga14yspvWKKc+5+ZQecxlBhuB4+ULv9Pz7jF NFF7TFUBdeispeFL/FqQSliPcmaK2wNWuK5ZQ3l1oxwXqhbpZ2sHWL80jZt0SQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 27 May 2024 01:52:27 +0200 Message-ID: <20240526235230.2876318-15-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240526235230.2876318-1-michael@niedermayer.cc> References: <20240526235230.2876318-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 15/17] avdevice/dshow: check ff_dshow_pin_ConnectionMediaType() for failure 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: Maybe Fixes: CID1598557 Explicit null dereferenced Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavdevice/dshow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 645c33ea2e6..403e56fe135 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -1546,7 +1546,10 @@ dshow_add_device(AVFormatContext *avctx, ctx->capture_filter[devtype]->stream_index = st->index; - ff_dshow_pin_ConnectionMediaType(ctx->capture_pin[devtype], &type); + if (ff_dshow_pin_ConnectionMediaType(ctx->capture_pin[devtype], &type) != S_OK) { + ret = AVERROR(EIO); + goto error; + } fmt_info = dshow_get_format_info(&type); if (!fmt_info) { ret = AVERROR(EIO); -- 2.45.1 _______________________________________________ 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".