From patchwork Tue Jun 8 19:29:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 28176 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp171839iol; Tue, 8 Jun 2021 12:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0479zckcGTa/uuHOg8w/LYj6cRGpzFYldYyRueJrsqiycwc3BQDytBPAk6o67VRMVGAST X-Received: by 2002:aa7:d755:: with SMTP id a21mr27637519eds.146.1623180980006; Tue, 08 Jun 2021 12:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623180979; cv=none; d=google.com; s=arc-20160816; b=FIMItq1T6FV+AhHEY9cy3xPlVjRSmsm87C69XZQ6MwBOdKnXu8x+sQNaZ369QZ9m7H xQPeMTgTc/zWiUWs2pMPx9lDalvT2l1iB9vzFnyRWGyOgOFtvUwyrw9axdg1TLicqoc7 xwMRWIebra0DOVfWLiA3ZkOWUeZ9yLupA6RHUCQvIrz9TQseDc/O4XHVJJgDqfBROrjn fq8ZepB0CMUZabL+BYZmz1egqb0vHqIF/gD88oynSCi+gISiHxVJcOccD2fb2B1k261M eZ9t9sisOJzFtlj1+h+A+4AD3n1+YYhhD1BALa3wv9QSjVGWtOE40h7wQ25C+YinmgyA pHKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to; bh=XDimYOquFvaqicK1Vb9XxiiH2H9g3CkID6nS0cTCNAU=; b=Q4h6j1rhvjrF0jjEoU1hYQENYwg+WNo2QNrCOF7ZuUUL/djgXxJUBblkgG1MLiHyFw je3Ki4rm4pqMG5uMUGxIV1jnbQLFF6GuYiaAi/n3brtlaBVZCjSCrQ9Q6fddN/vln/30 gPTr6UVlK/rGmzI0FVXtdA0mKpHLTaTyDqyMXOgxlmDoumsWgBM3Ir5Rj3jJCBygbJS/ CJdsbM5NV54orpi/J6N2t8oIzc4C4rGMXQvReOAA+uplUjtlom+kZ2nbPCf+SnvBBHuE GIX9YwyGLjqAhafSP+T3avMK+Bntxq2CGnd4umghwsqcLdC5IcVQvXgjaaavceX5WbyJ C6/g== ARC-Authentication-Results: i=1; mx.google.com; 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 dn21si480757edb.483.2021.06.08.12.36.19; Tue, 08 Jun 2021 12:36: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; 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 62ED3687EBB; Tue, 8 Jun 2021 22:36:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe01-1.mx.upcmail.net (vie01a-dmta-pe01-1.mx.upcmail.net [62.179.121.154]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A2A3B68052A for ; Tue, 8 Jun 2021 22:36:10 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1lqhQw-00E1KN-0A for ffmpeg-devel@ffmpeg.org; Tue, 08 Jun 2021 21:30:42 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id qhPylr3U4ljeHqhPylDuLd; Tue, 08 Jun 2021 21:29:42 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 213.47.68.29 X-CNFS-Analysis: v=2.3 cv=BoHjPrf5 c=1 sm=1 tr=0 a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=ZZnuYtJkoWoA:10 a=nZOtpAppAAAA:20 a=3p-adiKe7gTrXlEZu-kA:9 a=1fhp2MxaeJtTNGEnv6mo:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=SsAZrZ5W_gNWK9tOzrEV:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 8 Jun 2021 21:29:41 +0200 Message-Id: <20210608192941.15327-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210608192941.15327-1-michael@niedermayer.cc> References: <20210608192941.15327-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfP/QX5+Aw9VZu6B3VqvFc6vyNDiiIkwKLbqtW49Ne5cgG5CLWMiOB8S9djPlRxHVkPmAV+A0mR12sZGLRC+ycPp4NgaEkpjabPCCJ8dNQLXpzlEKVRAn HATSUA+8R58vh5sGvieLz+1NRA/se9UuD8rb9zil7hXrjrksenMf+m5B Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/ttadata: Add sentinel at the end of ff_tta_shift_1 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 14+GNlrmFazY Fixes: out of array access Fixes: 34933/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TTA_fuzzer-5629322560929792 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/ttadata.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ttadata.c b/libavcodec/ttadata.c index bf793a4cc8..aa9f418a7d 100644 --- a/libavcodec/ttadata.c +++ b/libavcodec/ttadata.c @@ -30,7 +30,8 @@ const uint32_t ff_tta_shift_1[] = { 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, 0x80000000, - 0x80000000, 0x80000000, 0x80000000, 0x80000000 + 0x80000000, 0x80000000, 0x80000000, 0x80000000, + 0xFFFFFFFF }; const uint32_t * const ff_tta_shift_16 = ff_tta_shift_1 + 4;