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 CBF1E46F61 for ; Sun, 23 Jul 2023 18:07:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 51E9C68C6F8; Sun, 23 Jul 2023 21:07:29 +0300 (EEST) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 38C9E68C6D2 for ; Sun, 23 Jul 2023 21:07:23 +0300 (EEST) Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-6b9c5362a51so2821070a34.0 for ; Sun, 23 Jul 2023 11:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690135641; x=1690740441; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2qtFiLirqIcrra0Gt2He7cjpB1yTa8wPmcEUyQ36vNw=; b=gM7V0LUMB8NSKTYlTyPMlKJ3tHbDqoBIF6uSoU88IQ+ggHkpo0U61hWYZf9u7U/Iy0 f7Ss5FzaNusrhjXvkpbKqYSBk1vMWcmALBpiXRTxPzPP2Gzvqgx3UGcRL7TgVLJYAIl8 NcAzJle/BcIQ7BoCf66VU/+t2ieV8bTVSFUelD30w0AexNBWgbyuZ808TKNmeBtZkoJh fMhjF4zKKsathrXXCmkq2GpjcXJtegsesOIyhe4ww+A0ndYW81oSmHUlZ13k/TSjCwad GhThVLwp+CA0zBpV9C6fCl4JhZouQIGaFn2BcNYj5GsfmgWedZNH/xxzmI6NWTYs+OWn K+9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690135641; x=1690740441; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2qtFiLirqIcrra0Gt2He7cjpB1yTa8wPmcEUyQ36vNw=; b=Ukf04tTyLVGFu+P+llZSAefQLf6S3ilmTNBLhye99Aa/qqv9762c5nqcWGUhSpiaZB yYq2T7tvU68Fbxlo48ZqP5jNPBRoBcAy6rUo01xOh+VVYUlr7HUsL7JkC7gSTPpO4s8y 99l6UlZmuRlSnvzqKcstAC3KTqoFKos2JpXGRSsR7msalz/IEUGi6ZHS5s+MA0EAdhIw gkBruTYuOIsBRH8jzpvzUj/56pO2QtQLux/7fAAVyqzi1tde397pm6XoCKqxEcIxNhy0 +PEP4/l3h/AUExaorRhSR6mR8+nKwUSR/JjLSGyC+l5f8msZ4ZZaJP+ewVMbqeZ6/xLD T0oA== X-Gm-Message-State: ABy/qLZA1voTRj2oTRFq7u+0K7z8FB05Hjtiw8dBS9D45nulIt7ciPdm /WgXMDuwnaK3wR5HXfTpyY/dQGfzrWg= X-Google-Smtp-Source: APBJJlG7K2bAzl/ZQd89ERFCstuaZJV7UBtlcaIDUvhcP0wzuGQL18xcXK11SrWqzBSQa2BpsqKpnw== X-Received: by 2002:a05:6830:59:b0:6b9:a399:85bc with SMTP id d25-20020a056830005900b006b9a39985bcmr5563481otp.28.1690135641193; Sun, 23 Jul 2023 11:07:21 -0700 (PDT) Received: from [192.168.0.16] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id d17-20020a9d5e11000000b006ba864f5b37sm3238422oti.12.2023.07.23.11.07.20 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Jul 2023 11:07:20 -0700 (PDT) Message-ID: Date: Sun, 23 Jul 2023 15:07:32 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230723180303.8000-1-michael@niedermayer.cc> <20230723180303.8000-5-michael@niedermayer.cc> From: James Almer In-Reply-To: <20230723180303.8000-5-michael@niedermayer.cc> Subject: Re: [FFmpeg-devel] [PATCH 5/5] avcodec/h266_metadata_bsf: Check if there are CodedBitstreamFragment units 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 7/23/2023 3:03 PM, Michael Niedermayer wrote: > Fixes: NULL pointer dereference > Fixes: 60269/clusterfuzz-testcase-minimized-ffmpeg_BSF_VVC_METADATA_fuzzer-5215449416335360 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/h266_metadata_bsf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/h266_metadata_bsf.c b/libavcodec/h266_metadata_bsf.c > index c0dbf8ef96..1f0f875cfe 100644 > --- a/libavcodec/h266_metadata_bsf.c > +++ b/libavcodec/h266_metadata_bsf.c > @@ -43,7 +43,7 @@ static int h266_metadata_update_fragment(AVBSFContext *bsf, AVPacket *pkt, > int err, i; > > // If an AUD is present, it must be the first NAL unit. > - if (pu->units[0].type == VVC_AUD_NUT) { > + if (pu->nb_units && pu->units[0].type == VVC_AUD_NUT) { > if (ctx->aud == BSF_ELEMENT_REMOVE) > ff_cbs_delete_unit(pu, 0); > } else if ( pkt && ctx->aud == BSF_ELEMENT_INSERT) { Should be ok. _______________________________________________ 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".