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 D926948BE9 for ; Fri, 9 Feb 2024 09:18:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9A4C968CEAB; Fri, 9 Feb 2024 11:18:45 +0200 (EET) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 427E4689245 for ; Fri, 9 Feb 2024 11:18:39 +0200 (EET) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-6e096229192so69885b3a.1 for ; Fri, 09 Feb 2024 01:18:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707470317; x=1708075117; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=+CltWwCu0Nn9gxs3ePYOR9x4YWCQ+Xh8L/Ms7oKwk1E=; b=bXJyv/jRsKlys+9AU7HYVdGhsbLciFOdg98Pt//RPXdBqpg8F4RlIt+J/f84OH4c8h tpv3UFTJhlUyZyvcSiQZ6JQtRqp2h38byXGSWGSjYs0bMxuC1TG3jKoRbAop10oiRwJt 1M+f3WqniFOBCem5Hlz9djD1eUj6EIn9dgqLJDHBkTrw49nBi2VeCYdAAKTChFgs9baY BwyUGtdq6nLA2HVWsdl3rnPNSerWmrtOUm3ECXLQ66hNo/5NZpEFqEcHLw70H8vSZe3c guadB1zDmQBz/3qAvTDhIkvAoi5yQOpiM4oxQahO1KpUS9IsS5Abl8KdS+4CxdmGQdQn qWKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707470317; x=1708075117; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+CltWwCu0Nn9gxs3ePYOR9x4YWCQ+Xh8L/Ms7oKwk1E=; b=Se828Uq0Y71G9VD568QEGUEJSzoPiD//fEZjUZqogegyWwgH8nx5eOKxc2zJm1gPVX mZRiSyMGzp25tWZj3/L6l0Yd9VTfuAvGho/YcM916Kh0F0IjXILGdhlYqx9E4PW4tXUO xOL5V4hS9X6rbLFfWZrNUyNN1T3xvNfGps4p1kYoCmsHW5Edje2IEaqqcVeLwTogDEYV YnJwPbgRmt9btTZzXwqwKZQb/S9112Oqt7430bjSTULdBEI/P8PBMXkHMkXb5Uo8N4Q7 u8od/Al3yGx4V8e9Mb6h647LiBDtesjHRAq0pnUC/VTbmqEg+EfsBAdcYLi5oYBpoKsZ QbPQ== X-Gm-Message-State: AOJu0YyrUi7jtV6kSpc5i+N2LljAjiLFTYq5vpLpHI6+825Eyb9pfbXI 5qGkpTjcdqcA/h/1635zGsrT1LOf1NXhl/iczUl/fhKdbIF1Ih2Ym724+N1ojdc= X-Google-Smtp-Source: AGHT+IGqy8mBS+Xlul8nWu67hGas0AC5cuExfbC3PWpvX5oe01joP7dH21i0Ygr7jTSIKU+g7zIP5A== X-Received: by 2002:a05:6a00:2284:b0:6e0:465e:cdd5 with SMTP id f4-20020a056a00228400b006e0465ecdd5mr1403810pfe.23.1707470317092; Fri, 09 Feb 2024 01:18:37 -0800 (PST) Received: from localhost ([2601:647:4600:84e0:d085:ac8a:daf1:f5a1]) by smtp.gmail.com with UTF8SMTPSA id f5-20020aa79d85000000b006dd6c439996sm1174286pfq.161.2024.02.09.01.18.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Feb 2024 01:18:36 -0800 (PST) From: Connor Worley To: ffmpeg-devel@ffmpeg.org Date: Fri, 9 Feb 2024 01:18:32 -0800 Message-Id: <20240209091832.67363-1-connorbworley@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc/dxvenc: fix uninitialized texture data 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: Connor Worley 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: Prevents access to uninitialized parts of ctx->tex_data, which were causing FATE tets to fail under valgrind with --malloc-fill set. Signed-off-by: Connor Worley --- libavcodec/dxvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dxvenc.c b/libavcodec/dxvenc.c index ebc48aace3..b92d99981c 100644 --- a/libavcodec/dxvenc.c +++ b/libavcodec/dxvenc.c @@ -234,7 +234,7 @@ static av_cold int dxv_init(AVCodecContext *avctx) ctx->enc.tex_ratio; ctx->enc.slice_count = av_clip(avctx->thread_count, 1, FFALIGN(avctx->height, 16) / TEXTURE_BLOCK_H); - ctx->tex_data = av_malloc(ctx->tex_size); + ctx->tex_data = av_mallocz(ctx->tex_size); if (!ctx->tex_data) { return AVERROR(ENOMEM); } -- 2.40.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".