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 5898E4B64E for ; Sun, 11 Aug 2024 00:33:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DD91B68D980; Sun, 11 Aug 2024 03:32:57 +0300 (EEST) Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1C82E68D76C for ; Sun, 11 Aug 2024 03:32:51 +0300 (EEST) Received: by mail-oi1-f179.google.com with SMTP id 5614622812f47-3db22c02a42so2173845b6e.3 for ; Sat, 10 Aug 2024 17:32:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723336369; x=1723941169; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=0m1ZQZyRVVaMgM9ZNFztLDRDSkVQDs+U6d8IItRTL/4=; b=R12xJSjRoN8Hx3InPzx5EEJHoPG0GdeaWlBra6m/p2sO6WqpH+8P1L95wEP1jVhS8Z LCrfLDNYGk0KRlVRLwi3ZB235Xf4DhDzx2uNJAowY1ak0d7mBRzO/xnMll3eUXxytjcK se0CSKXTl7MyZAv1642DxRh9wTbSvqeEUUi8PwjRRke4fBmDaEeOHP+9Iwt1h20oxF7o Mw+4jXS19t/Q/HF1bLCxX8UAA/aS3DLQPIEv67NiJCoafOFKSQRnebcQ6iTASHwdvIns qovoys6ugZx6aLU29AhGViiNpE+q/Ujk3bKx5Qi6Mduat1p0KfGQ2ofIcjNDFxOqUeGJ Igyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723336369; x=1723941169; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0m1ZQZyRVVaMgM9ZNFztLDRDSkVQDs+U6d8IItRTL/4=; b=GWf/hW9fBrowK3XxudnwBr6yLyhRjhlCrKyFvevEyl6D2Fycl2hM7JF5fh9Eygl1vR T3qKhOPCcFm6Hr8+NZDbNk100VxGiUiDsMsIFi8cnHB3n/eur3KbnFUD6ThTGMlXhkKA /yRl6DYx+wK5eYXu2ZuehL7x9WFsMWO1gnWu4ek7uyykvFqOQr9z8C9O6aXOAY1ONo4Q 380QQ8kNQqtO5igZJ8mQ2aRfLmqf6qyCaSL1j0WYKp57tnC9lGN9wj5QH6NtrA0p8LYU LwUDR8Y3pNWXWJKxN9Px3Wrrlbur0OrGkCRUKjpmDjlrb/2UjJbq02Updbb0348ta8Hi DbQg== X-Gm-Message-State: AOJu0YyvejE+snqqXApqxMYPdyFM7fgYSnfI5JxZl4cEsu7kewrdnN4Q jCoX0RU3pSZkKOBIEnp7GJdxkUpsJ9NOmYz9qjTw5lvhWaJL+gYUDwQQig== X-Google-Smtp-Source: AGHT+IGCaWtTSdDbGGJNuDN58br0hGpOfVdme/s27u73lweE06yTwsMMLRqWzutfPRPa/PzsA4dwSQ== X-Received: by 2002:a05:6808:3c8a:b0:3d9:2b24:5b2 with SMTP id 5614622812f47-3dc415e2314mr8068708b6e.0.1723336368823; Sat, 10 Aug 2024 17:32:48 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7c3dbe38c37sm1834770a12.42.2024.08.10.17.32.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Aug 2024 17:32:48 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Aug 2024 21:32:46 -0300 Message-ID: <20240811003246.4334-1-jamrial@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avfilter/video: don't zero allocated buffers if memory poisoning is used 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: Same as in avcodec/get_buffer.c Should help in debugging use of uninitialized memory. Signed-off-by: James Almer --- libavfilter/video.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/video.c b/libavfilter/video.c index 89d0797ab5..afd3dc3dc3 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -71,8 +71,10 @@ AVFrame *ff_default_get_video_buffer2(AVFilterLink *link, int w, int h, int alig } if (!li->frame_pool) { - li->frame_pool = ff_frame_pool_video_init(av_buffer_allocz, w, h, - link->format, align); + li->frame_pool = ff_frame_pool_video_init(CONFIG_MEMORY_POISONING + ? NULL + : av_buffer_allocz, + w, h, link->format, align); if (!li->frame_pool) return NULL; } else { @@ -86,8 +88,10 @@ AVFrame *ff_default_get_video_buffer2(AVFilterLink *link, int w, int h, int alig pool_format != link->format || pool_align != align) { ff_frame_pool_uninit(&li->frame_pool); - li->frame_pool = ff_frame_pool_video_init(av_buffer_allocz, w, h, - link->format, align); + li->frame_pool = ff_frame_pool_video_init(CONFIG_MEMORY_POISONING + ? NULL + : av_buffer_allocz, + w, h, link->format, align); if (!li->frame_pool) return NULL; } -- 2.46.0 _______________________________________________ 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".