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 ESMTPS id 4E2714D1C8 for ; Tue, 18 Feb 2025 11:27:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5067768BECE; Tue, 18 Feb 2025 13:27:34 +0200 (EET) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A189F68BBD3 for ; Tue, 18 Feb 2025 13:27:27 +0200 (EET) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 51IBRQTn022554 ; Tue, 18 Feb 2025 12:27:27 +0100 Received: by phare.normalesup.org (Postfix, from userid 1001) id CB97C2EFDF; Tue, 18 Feb 2025 12:27:26 +0100 (CET) Date: Tue, 18 Feb 2025 12:27:26 +0100 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: References: <20250218112414.142222-1-eslamsamy226.ref@yahoo.com> <20250218112414.142222-1-eslamsamy226@yahoo.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250218112414.142222-1-eslamsamy226@yahoo.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Tue, 18 Feb 2025 12:27:27 +0100 (CET) Subject: Re: [FFmpeg-devel] [PATCH] avcodec/v4l2_m2m: Fix segmentation fault due to a missing NULL check in v4l2_context.c 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: Eslam Samy 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: Thanks for the patch. Eslam Samy via ffmpeg-devel (HE12025-02-18): > --- > libavcodec/v4l2_context.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c > index be1df3785b..ea11a689bc 100644 > --- a/libavcodec/v4l2_context.c > +++ b/libavcodec/v4l2_context.c > @@ -329,7 +329,7 @@ start: > /* if we are trying to get free buffers but none have been queued yet, > * or if no buffers have been allocated yet, no need to raise a warning > */ > - if (timeout == 0) { > + if ((timeout == 0) && (ctx->buffers != NULL)) { This does not match ffmpeg's coding style, the extra parentheses and the != NULL. > if (!ctx->buffers) > return NULL; Can you explain how this hunk makes sense with your change? Regards, -- Nicolas George _______________________________________________ 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".