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 6EDA6407B9 for ; Thu, 23 Dec 2021 05:25:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 244CD68B0A0; Thu, 23 Dec 2021 07:25:15 +0200 (EET) Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3E58E68AEE5 for ; Thu, 23 Dec 2021 07:25:09 +0200 (EET) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4JKJYJ2xldzQlZ4 for ; Thu, 23 Dec 2021 06:25:08 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Message-ID: <838f6d6a-f7e7-2ef5-757a-f0f772d85cc7@gyani.pro> Date: Thu, 23 Dec 2021 10:54:52 +0530 MIME-Version: 1.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20211221135337.1348-1-dcnieho@gmail.com> <20211221135337.1348-2-dcnieho@gmail.com> From: Gyan Doshi In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v7 01/12] avdevice/dshow: prevent NULL access 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 2021-12-23 10:39 am, Roger Pack wrote: > These LGTM, could someone apply them for me? > Thanks! Tomorrow, if no else does, or objects. > > On Tue, Dec 21, 2021 at 6:54 AM Diederick Niehorster wrote: >> list_options true would crash when both a video and an audio device were >> specified as input. Crash would occur on line 784 because >> ctx->device_unique_name[otherDevType] would be NULL >> >> Signed-off-by: Diederick Niehorster >> --- >> libavdevice/dshow.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c >> index ef78781865..cc0bef0474 100644 >> --- a/libavdevice/dshow.c >> +++ b/libavdevice/dshow.c >> @@ -708,9 +708,9 @@ dshow_list_device_options(AVFormatContext *avctx, ICreateDevEnum *devenum, >> if ((r = dshow_cycle_devices(avctx, devenum, devtype, sourcetype, &device_filter, &device_unique_name)) < 0) >> return r; >> ctx->device_filter[devtype] = device_filter; >> + ctx->device_unique_name[devtype] = device_unique_name; >> if ((r = dshow_cycle_pins(avctx, devtype, sourcetype, device_filter, NULL)) < 0) >> return r; >> - av_freep(&device_unique_name); >> return 0; >> } >> >> @@ -1143,6 +1143,7 @@ static int dshow_read_header(AVFormatContext *avctx) >> } >> } >> } >> + // don't exit yet, allow it to list crossbar options in dshow_open_device >> } >> if (ctx->device_name[VideoDevice]) { >> if ((r = dshow_open_device(avctx, devenum, VideoDevice, VideoSourceDevice)) < 0 || >> -- >> 2.28.0.windows.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". > _______________________________________________ > 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". _______________________________________________ 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".