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 9E79E407B3 for ; Thu, 23 Dec 2021 05:09:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BD00E68AFFD; Thu, 23 Dec 2021 07:09:46 +0200 (EET) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7D2B268ADF7 for ; Thu, 23 Dec 2021 07:09:40 +0200 (EET) Received: by mail-lj1-f173.google.com with SMTP id v15so7418455ljc.0 for ; Wed, 22 Dec 2021 21:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lj8uUeKniZeeh2j8e+s2v6zaFtCbznD3V4VkHLxFmqc=; b=Adzcwcm39/4huK14Fc1cyE6aJj1IkdCgkdQN+YGtnuj0O+OXEWuqY8mnsWtCf2Q7sZ ihVkPNMWAYXJaXMedWtiuqxGTkDyTIpUh7vJF7h8mKibWTGDi3okD85znnJ7cX4jE/DM zTIaNVmDjUg2nUCOfnUuZh5iNiGeCjq0gv7eheVC8Ru0vrmYHSeknomDItJL2FbfivDq oVNXfTJXFkmE4ix4XhNSS5yapiXRaXvKGYxxa9EaXN/qEx48ak+9kRe97bxHvJcJDWoS J9t5NU5y+mmQq0A8Sd0b/jTnA4KYdjb+e+3GzG2xsyzpt6muyaxCH0rFCTz6Ubvri0e2 dnmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lj8uUeKniZeeh2j8e+s2v6zaFtCbznD3V4VkHLxFmqc=; b=ELwliybEFW6cLyL6irpn1VmHpxDQ/3k8VSWWH/VljrLQfkC/3GA6X4ozytDG+/AQ0Y A+eHF0toLeHhCPNLJ4q6/TzI+f3uYZ01fsHKt/Qwha2Iu/P60k78FuD6+PFsMPwd5vyZ rGSEe2P+QhDJBlQH0+KH2vUvKdNW5OuxLQcgiFxtWPxo9n/yNJEsyVub5tkMIMWTeA9B Fi+h/GqeAcB2SdCWhc3ajpPUCyd/UCpszmGzwG/R15KXzyWua0hBQudnFA3G3VXiU1Ic fpAtG/51uOJHvb5k3cfGISU7q859X40vBbFEkQ06qjXLHU7iY/S+FsVZvoso8QjLhjuF sr8A== X-Gm-Message-State: AOAM531d/T3FaJSFtHe4fbNX2vk+wvHf2Dr/snjJPeqVUDbeHPIGqJ3Q kc5VPgdBksa3V31iXAJ5CpenLHTmZUKHQ2nAZOtpC7BfBoQ= X-Google-Smtp-Source: ABdhPJwVGJfL76A5uAELKC9L8qhe9ennnWx3Gbzr3XF5xgDhBI+UhP4QAzWgE5skvvc9cnUwjedOmH9OjSPONNO7vLE= X-Received: by 2002:a2e:a7c9:: with SMTP id x9mr350328ljp.26.1640236179405; Wed, 22 Dec 2021 21:09:39 -0800 (PST) MIME-Version: 1.0 References: <20211221135337.1348-1-dcnieho@gmail.com> <20211221135337.1348-2-dcnieho@gmail.com> In-Reply-To: <20211221135337.1348-2-dcnieho@gmail.com> From: Roger Pack Date: Wed, 22 Dec 2021 22:09:11 -0700 Message-ID: To: FFmpeg development discussions and patches 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 Cc: Diederick Niehorster 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: These LGTM, could someone apply them for me? Thanks! 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".