From patchwork Fri Aug 16 23:11:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 51044 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b6ca:0:b0:48e:c0f8:d0de with SMTP id s10csp731650vqj; Fri, 16 Aug 2024 16:12:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXgHiwdMyvgTSpT08OSsIo8JXoWy2liWI+WAqp3e16WwJ7OxwcWCh+wDvWmogVyWCwv2Bds2nEam2E551YezEZpjrsyAHKtJUAlow== X-Google-Smtp-Source: AGHT+IHRyaxZWtYbiuf8oLXoV2fvNaZls69taqG0rWH/jtn/JRef2MYhwPE285YHPmo2T9VsG0JJ X-Received: by 2002:a2e:b887:0:b0:2ef:22a5:9472 with SMTP id 38308e7fff4ca-2f3be5de27cmr29948471fa.38.1723849939785; Fri, 16 Aug 2024 16:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723849939; cv=none; d=google.com; s=arc-20160816; b=0QCn4MzWrvfUojyiafcCPyXqhTmdxYyUBE18CQFXjpRxw4K6e2hsj+FUhGlayKc+1k mzKGFFyhoDSsszIJ16fc9q/oDZtaISFbywWIi/Sl2ML1hk0KDYmF0umLkWRdwwIG6g1Y DJt/6LoXYlsotrCerAOez0WMbE0sRjE+tsl/IUI3bvyBdO4MmPWUv+hbMWVQEaniKMiV hARtzENnhapqtX6v5gEPVInyn3YtOSJfAzQnMj1jCzoPB3at/vLLUGegT3GMGUHJki95 5WLInWrNqr9QVwcZBzyald3DVJzLfJyymMSLNdBEnrYhr7cpKoWDsxMMw7SLMfm07f4e LlAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=o/d/eHTWGumAGGB4fQ2poo+ZlCYmiEjNTyxCHmqzWps=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=NNfwtPH3RXOpujpLI0D8mueiCz3QmbewBYsxKuoMMamr7aXQoFgNPUlt+f8ZTDkawV DdwcTeCud4FAc6tVkoKbDr9RcBwdjjRwBmNhbenm+Ws5kzIWbmTYqoPn9IC8ScyM8bXX F39ctt+jFu9070RDQ6mHJs4rGBS2kYWg9QDul3LOJ2g847WLWBN7Sd/ZOQQuDQKzI5Fv rb61Br2GRityZLbMrTyydLwSEBHskdPxg5netYXyBgVVQpzgpzMFe6eSjhI6K4zoxGdo pSItBJS9XpdKX41gfYvB8oWxKLKjU6zP8QTcANHYDelPq47uf2P5trabccqEV352xpoZ XETw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=U4AZhLSO; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5bebbdefa77si2571487a12.167.2024.08.16.16.12.19; Fri, 16 Aug 2024 16:12:19 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=U4AZhLSO; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BB66C68DC97; Sat, 17 Aug 2024 02:12:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3FFB868DC98 for ; Sat, 17 Aug 2024 02:12:00 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 93E2220002 for ; Fri, 16 Aug 2024 23:11:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1723849919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+5FJMq5eSAzsNBm2g4EonAR+Zb2JCQKc5sFtNsq1aw0=; b=U4AZhLSOhtGNo/3NNkku8wKQAUM/PyPvqoED6z42fANkWs2XkA0uUkq7h1bo/CLEGTiTr7 AFvHbofhgyb2r8e7tn2MFz/ERlg9zYFSG9+g8Lk3Zw6/l3+gf6xnViUOnnCrwHSFJJhkjC SKqH9/+stoiGzgwW37TjmXYDWjdznxLTwxMwqSEhBNnbXVZBKc9YcvNZ17w0btLhP3p648 R+wCUtB3U4wn7h4FTfZzjeypHoHkIr1tRVP6E67ZTsa9DYNXrNDBCY7ZXL2o+ESr5/V9Uc MjkW9BQYdjsv6FEj3lmMIN1AouUIMEQSl66x/bfsdQ6MBpQapXOrfzv3Ho7GqQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 17 Aug 2024 01:11:50 +0200 Message-ID: <20240816231157.3166012-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240816231157.3166012-1-michael@niedermayer.cc> References: <20240816231157.3166012-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/9] avcodec/avcodec: Warn about data returned from get_buffer*() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: O2DqQYPMpa6d Signed-off-by: Michael Niedermayer --- doc/APIchanges | 4 ++++ libavcodec/avcodec.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 173f317ea1b..53d164959c0 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-08-xx - xxxxxxxxx - lavc 61.11.100- avcodec.h + Not really a change but get_buffer*() should not return + sensitive data + 2024-08-10 - xxxxxxxxx - lavu 59.34.100 - hwcontext_vulkan.h Add qf and nb_qf to AVVulkanDeviceContext. Deprecate queue_family_index, nb_graphics_queues, diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 2da63c87ea1..cc6dbfa59fe 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1175,6 +1175,10 @@ typedef struct AVCodecContext { * this callback and filled with the extra buffers if there are more * buffers than buf[] can hold. extended_buf will be freed in * av_frame_unref(). + * decoders will generally initialize the whole buffer before it is output + * but it can in rare error conditions happen that uninitialized data is passed + * through. The buffers returned by get_buffer* should thus not contain sensitive + * data. * * If AV_CODEC_CAP_DR1 is not set then get_buffer2() must call * avcodec_default_get_buffer2() instead of providing buffers allocated by