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 D9D294959C for ; Tue, 13 Feb 2024 10:39:05 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 24BC268D1E8; Tue, 13 Feb 2024 12:39:03 +0200 (EET) Received: from sender-op-o18.zoho.eu (sender-op-o18.zoho.eu [136.143.169.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 852C068D1DF for ; Tue, 13 Feb 2024 12:38:56 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; t=1707820733; cv=none; d=zohomail.eu; s=zohoarc; b=Wd46blqeuYgAbGOCBof1udeDjZHJ1U8+ojJt3gsUkS7ng5vW0KMxkI5FIhFP+ak0uzKYqpEoVXOfiiTAJbc8S4c43H/3MaMFURENslfwASh+MV2/s0MWLLpIY+EqQutyopnZqvMxDV/QaKV/HhXWg13R8foyzKcuvJUn36ymHPk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1707820733; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=0W/hYULNuPXci6X8Iog5DhDkUfEUzufR3ptSrhnETi4=; b=MXOiePts5AxrxeOS6y/hyxssNpOqkRvGMKHltSj9tSJjAhzm5SBKz/a2CY2RYNBZPCAJJJPACSyW2gnAPnKOv+QeZ1lY14i6Gj1ALSBmYhHhJs0jIJpfTNIb7DPG3iyUCvXCaPLy6uqShcSJN818KZ1qSEh/qyrwWSSHTyEJ5Q8= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=frankplowman.com; spf=pass smtp.mailfrom=post@frankplowman.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1707820733; s=zmail; d=frankplowman.com; i=post@frankplowman.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=0W/hYULNuPXci6X8Iog5DhDkUfEUzufR3ptSrhnETi4=; b=PHGtAaD9vMkJIginqHwW/T/5ni236rjiqFwjoYtvCguC8CcUxDN7NWx+RiUmBkR9 hlgT4x3YAKqTSYUt3qekVndyOxbwwF/nFnp0R+38+DUtscitvzsfuHBoc78I3LrZfBw uJArs6ZMpiQbuXmp+Rk/deNPejQPaIewZDBaawSo= Received: from [10.0.0.6] (frankplowman.com [51.89.148.29]) by mx.zoho.eu with SMTPS id 1707820731307815.2924023234253; Tue, 13 Feb 2024 11:38:51 +0100 (CET) Message-ID: <77dbe705-6ea1-41de-b8cc-edbd41624952@frankplowman.com> Date: Tue, 13 Feb 2024 10:38:50 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: ffmpeg-devel@ffmpeg.org References: Content-Language: en-GB From: Frank Plowman In-Reply-To: X-ZohoMailClient: External Subject: Re: [FFmpeg-devel] [PATCH] avcodec/vvcdec: frame_context_setup, set fc->ref to NULL 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: On 13/02/2024 02:30, Nuo Mi wrote: > fc->ref points to an old VVCFrame, which cannot be used after frame_context_setup. > This prevents crashes in decode_nal_units-->ff_vvc_report_frame_finished. > > Signed-off-by: Frank Plowman > --- > libavcodec/vvc/vvcdec.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavcodec/vvc/vvcdec.c b/libavcodec/vvc/vvcdec.c > index 8163b5ecb6..e88e746de4 100644 > --- a/libavcodec/vvc/vvcdec.c > +++ b/libavcodec/vvc/vvcdec.c > @@ -594,6 +594,8 @@ static int frame_context_setup(VVCFrameContext *fc, VVCContext *s) > { > int ret; > > + fc->ref = NULL; > + > // copy refs from the last frame > if (s->nb_frames && s->nb_fcs > 1) { > VVCFrameContext *prev = get_frame_context(s, fc, -1); LGTM. Fixes the crash on all the fuzz data I have which produce it. FATE runners are failing at the time of writing, but I manually ran this against the VVC tests as well as the suite from the FFVVC GitHub and all tests passed. Btw, I don't think you should add Signed-off-by tags for other people. Their exact meaning varies by project and I am not sure of their meaning in FFmpeg (if there is one), but generally they indicate that person claims some sort of responsibility for the patch in the case of e.g. a license violation. That being said, I am happy to sign this off. -- Frank _______________________________________________ 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".