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 64CB84C48E for ; Sun, 28 Jul 2024 10:26:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3AA3D68D93C; Sun, 28 Jul 2024 13:25:52 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CF89E68D866 for ; Sun, 28 Jul 2024 13:25:41 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1722162338; bh=0Fyc8RtjPmbKBjckBo6URpCvxaKZ3rgc8TbiMiTitJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AoeAGlIzcBZjYOOdMQdBn//hBytTitf4g9lYsrq1Nru+xJRm1MOm9+kHuuzmZXH/Y vnO6/2C6rulNd2TsBrmRgfOnB6OVUoD7D0pt28ja2cgrIyGkHi86gt0jTB5UDKDlB9 Mm7th/+fkKlFTLnUh5D1YyfA88SK4LDuxm/No8UE= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id DD6EE43521; Sun, 28 Jul 2024 12:25:38 +0200 (CEST) From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Sun, 28 Jul 2024 12:25:22 +0200 Message-ID: <20240728102527.17991-17-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240728102527.17991-1-ffmpeg@haasn.xyz> References: <20240728102527.17991-1-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 17/22] avcodec/dovi_rpudec: sanitize DM data before decoding 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: Niklas Haas 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: From: Niklas Haas Some DM types do not fill the whole struct, so just clear it entirely before going filling the decoded values. --- libavcodec/dovi_rpudec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/dovi_rpudec.c b/libavcodec/dovi_rpudec.c index 91c9e41926..9f295d4fe4 100644 --- a/libavcodec/dovi_rpudec.c +++ b/libavcodec/dovi_rpudec.c @@ -323,6 +323,7 @@ static int parse_ext_blocks(DOVIContext *s, GetBitContext *gb, int ver, dm = &ext->dm_dynamic[ext->num_dynamic++]; } + memset(dm, 0, sizeof(*dm)); dm->level = level; switch (ver) { case 1: ret = parse_ext_v1(s, gb, dm); break; -- 2.45.2 _______________________________________________ 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".