From patchwork Tue May 4 21:05:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 27589 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6109:0:0:0:0:0 with SMTP id v9csp748136iob; Tue, 4 May 2021 14:11:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq2nIGmm23uWGyrQUOhJd2aVJ+CeNQeR2hjsBaoX/Bv7labCGDvta15zEGye7E7x9xo9B8 X-Received: by 2002:a50:9f8a:: with SMTP id c10mr2993369edf.65.1620162709829; Tue, 04 May 2021 14:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620162709; cv=none; d=google.com; s=arc-20160816; b=o5RvmSQ3z+TvQnsZT1yLRI0/puJfTGFpbqxPeHiiphqaZAJ0XgbY1B7PVI6Thmgo7n +SOWle9pMvD9HdrjrGb2bK0OG0yA9x5d6y/JQGRLJcSuBCR2/W30OhCD+zYownVDm9G7 WA215gXCQIqT5IQlH3wsyS/YM2Cq1ru+kvDam0h6WHXZL4vs9M/MAwx+fQ5yXz+5ndvt Hgt69CCAVqPZWD+BZNtKlja1Qf5SCAfUn5IR80QwbEYVLQ0PHSPNRGOchVSj4CCy9z5s AY0S5rc0xXZqcfSXOubRBfUTwq42OpDZI9ejWy3ITUxdn1Pju56Tp4UYY9YFqTP1dZnX rvUQ== 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:message-id:date:to:from:delivered-to; bh=baNBRBL4FeU2FHKaCDtbejJ5O46ascLOq/fmBDdOcIM=; b=j9EJj5Zni8aM5sS5g4TIgdF/JQbkGdv3QI3RCnRDJat+TeBirxs9Iqk1p8hl7L31gp NHguTxE+C9xye+VGm02tWq0qOljiBluNxUKjUBs2M1CqWntV9sqinXbW7N8CH8p18UOd mDGZ0Rx9aMWsgxF84VUsLPiCMa8LGSLz0aV/d7Nhmz22GMd3NBEvUCDkkOSrC1paxVS/ 6lAhx8aEnO9uFa54CSLKWm2OuOfF1UNS/s+gIhbPMx8DCxtjJfHabJ7lqlbvsgIsVAB5 Bqg49g6KzwtoZmMirzc5F7vZv8M2k+TZe+cikVCV2wArS8DgqdEfqZuLbHaYqWAPPRYg M+Zw== 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 b10si3544859ejd.716.2021.05.04.14.11.35; Tue, 04 May 2021 14:11:49 -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 9E0B3680C3F; Wed, 5 May 2021 00:11:32 +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 9E37B68069C for ; Wed, 5 May 2021 00:11:25 +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 1le2F2-001Yoz-07 for ffmpeg-devel@ffmpeg.org; Tue, 04 May 2021 23:06:04 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id e2E4lfjDVljeHe2E4lW7WH; Tue, 04 May 2021 23:05:04 +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=Enj_JAl4A3Mtry2jw10A:9 a=1fhp2MxaeJtTNGEnv6mo:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=jd6J4Gguk5HxikPWLKER:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 4 May 2021 23:05:02 +0200 Message-Id: <20210504210504.13396-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfLWmxNpjl5hO2xseVxI9JtvoG3LbjHFqFqZYJUV+yo889p82iO/lm4YyDCwtebAT8k35Qz11w1ONjScc98QE7aUMj1WBXev6hpMahbE3w6/tKQuqwRis 7f73ZwBIN72qFCb0Iynop9zt/ABZzm8j0FhXmS9Zp8ALN6p5aYI2N4gH Subject: [FFmpeg-devel] [PATCH 1/3] avutil/tx: avoid negative left shifts 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: lkQHGzyOO0xW Fixes: left shift of negative value -1 Fixes: 33736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-6657785795313664 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavutil/tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/tx.c b/libavutil/tx.c index 8da04e99ca..25adb6b37e 100644 --- a/libavutil/tx.c +++ b/libavutil/tx.c @@ -97,9 +97,9 @@ static inline int split_radix_permutation(int i, int m, int inverse) if (m <= 1) return i & 1; if (!(i & m)) - return (split_radix_permutation(i, m, inverse) << 1); + return split_radix_permutation(i, m, inverse) * 2; m >>= 1; - return (split_radix_permutation(i, m, inverse) << 2) + 1 - 2*(!(i & m) ^ inverse); + return split_radix_permutation(i, m, inverse) * 4 + 1 - 2*(!(i & m) ^ inverse); } int ff_tx_gen_ptwo_revtab(AVTXContext *s, int invert_lookup) From patchwork Tue May 4 21:05:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 27587 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6109:0:0:0:0:0 with SMTP id v9csp748143iob; Tue, 4 May 2021 14:11:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4plKFqpNB5jOYW+eqmQ2O1yZCTJ66tURiGu8sB+Dnf7sna//bpKRosYDO/uMkw2N1/ghE X-Received: by 2002:a05:6402:341:: with SMTP id r1mr27888699edw.113.1620162710223; Tue, 04 May 2021 14:11:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620162710; cv=none; d=google.com; s=arc-20160816; b=Kpmko7iI1/l5qTYr2YqScMB8EjWLDBizZcdKoZNkAK0o2y6vqAlbXaTSMMpmpvelip C2dB381FgfH0IABDreVrQ22nfz6C9orMR8nlNo8WfhfJDL3v7QfO68BFoEHBdwfGWqj6 k6oiEQGlBl7YWGKUMm3+YTWZ55rerVZxxVeuwuCNBHU0a9UamFLkn95/pdIcKzvAX1kG Kz+gLkilBsvyWoMZcZFeVExOSG7RKRvwD9rtsRAqQTQ4czb7wxkS6tRHqg5gpSP2sg/U GcURT0aPXGvdLaakcsNsUuYYY0zdbQGl1YpGNzLW8UzPfoXoBMZbrLJVezgybTfc3qnI ElRg== 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=IcKMglcQ6n9LURLa1pdywCf9FTU5NSLyvMFITVge2TA=; b=JswXsBW0p47DIR/ZX1uu4dUXdVovWlaPCptkuyhZNp4hWyHmXDEfvMaIKc7193g4QP 8fAbABGOrMCv9H4ZKx0diwy08aFeV+VwkW6dUaASXTtouUK1K2c458LEq9c0M4a4Tn13 /N9V5a2v8p9UhhaPM7mQSSRdEkweylfMegw9nLALOC71fc5xLrhmFg1rn7TYGbEvZVqv sDH5bvcbzRnx8zal+B8AUvNIE+IE9pXcSpIOemYUGdOxCHW7KCE5KhNW3ndg7tBWb0Cl MTcODx2U5FHY6CG8+/lCigSq6GRir+aOwme7dBGQHqUxu1aCbtI8Idmb1kFFzqdWPqLA GA9w== 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 n23si3658456eje.216.2021.05.04.14.11.45; Tue, 04 May 2021 14:11:50 -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 CDE34680C0A; Wed, 5 May 2021 00:11:40 +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 536366804D6 for ; Wed, 5 May 2021 00:11:34 +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 1le2F2-001Zb3-07 for ffmpeg-devel@ffmpeg.org; Tue, 04 May 2021 23:06:04 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id e2E4lfjFAljeHe2E4lW7Xk; Tue, 04 May 2021 23:05:04 +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=6AsULcmmzbk9M7o_s9EA:9 a=1fhp2MxaeJtTNGEnv6mo:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=SsAZrZ5W_gNWK9tOzrEV:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 4 May 2021 23:05:03 +0200 Message-Id: <20210504210504.13396-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210504210504.13396-1-michael@niedermayer.cc> References: <20210504210504.13396-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfLWmxNpjl5hO2xseVxI9JtvoG3LbjHFqFqZYJUV+yo889p82iO/lm4YyDCwtebAT8k35Qz11w1ONjScc98QE7aUMj1WBXev6hpMahbE3w6/tKQuqwRis 7f73ZwBIN72qFCb0Iynop9zt/ABZzm8j0FhXmS9Zp8ALN6p5aYI2N4gH Subject: [FFmpeg-devel] [PATCH 2/3] avformat/tta: Check for EOF in index reading loop 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: QA5XcdtAogNd Fixes: OOM Fixes: 33585/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-4564665830080512 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/tta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/tta.c b/libavformat/tta.c index 7a95675794..e1f9cf27d8 100644 --- a/libavformat/tta.c +++ b/libavformat/tta.c @@ -119,6 +119,8 @@ static int tta_read_header(AVFormatContext *s) for (i = 0; i < c->totalframes; i++) { uint32_t size = avio_rl32(s->pb); int r; + if (avio_feof(s->pb)) + return AVERROR_INVALIDDATA; if ((r = av_add_index_entry(st, framepos, i * (int64_t)c->frame_size, size, 0, AVINDEX_KEYFRAME)) < 0) return r; From patchwork Tue May 4 21:05:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 27588 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6109:0:0:0:0:0 with SMTP id v9csp748195iob; Tue, 4 May 2021 14:11:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVJrX91Qh4R/uV8x0bDt4XfowQn64Dmius7eXkdlwnU6SbyLQ1lf81zygzrozFb3vpgX/J X-Received: by 2002:a17:906:d8d4:: with SMTP id re20mr23502348ejb.505.1620162714790; Tue, 04 May 2021 14:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620162714; cv=none; d=google.com; s=arc-20160816; b=v9nQ+6r4hCI59x7Y90se6AkkWCI8UyLrVuHSRjdBX4aMguli4VQOOO0y98IUIPkBvw qjCjs4T+W7B0VfkWJ89RMn2GDk9kLiuqV4S7e+C6dauWJM/faKoPZwU13fUZFoAGb1Wo Y/InKd+J3w4HFtKWeU689QUr5BiErF5rmkFY7FKGcFCvYDocG0Gb5aXND06iq6E+pmZx RrDkt1srm4rJQF09UlZ1WkfWGEb98i1w2hWLmLmA00MRFO4SlwkDPb72EoNDwB3F+vhO BbwDngXxCOKaBxDYFFFPeUi+vIUHmC5ou8zK63ur4YRSAgAGyDq5UL2CrkGYruE19d4u at2w== 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=PQDgEkcsv9qYvB+DPR7SU1MBjjB1NXXXebpK6EH9if4=; b=OGeuWWyCXZc9miJ18EHv3W0FT8mLl6dd2y5lXgAJ8LnGa5kko7UFqngfoLnC4x60mG wIrmyi7+ZgEC2oN/JnfdSOrqc0zrv3rYHyrNoVDSt3GwQlYdh4lTf7vph2CD9qWUJdF8 T/X7pmnocOlZc40Zw5Wt1lW97EvwlvPK2/LKUvcn3zYT0wkhFe3s5XiUU2PalN7ULRWR lLd7C5DO6GhyiR33WvTDzxcNtMArGd24EdgoUbUxKCEOl7A3Q5w6Ayg0fXHZvpRAqas7 znfDI3kwBhV8qfUCsmQZ0at54zW1Xe95wqWjPEZeLrFxWCmaz8r1uDUghTyP6SYoGEIt YfOw== 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 dd21si6794197edb.331.2021.05.04.14.11.54; Tue, 04 May 2021 14:11:54 -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 E37AC6807AA; Wed, 5 May 2021 00:11:46 +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 AFC486807AA for ; Wed, 5 May 2021 00:11:40 +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 1le2F3-001Zb0-0A for ffmpeg-devel@ffmpeg.org; Tue, 04 May 2021 23:06:05 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id e2E5lfjFpljeHe2E5lW7YF; Tue, 04 May 2021 23:05:05 +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=ORTaOBfH1nB5wPfDDq0A:9 a=1fhp2MxaeJtTNGEnv6mo:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=SsAZrZ5W_gNWK9tOzrEV:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 4 May 2021 23:05:04 +0200 Message-Id: <20210504210504.13396-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210504210504.13396-1-michael@niedermayer.cc> References: <20210504210504.13396-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfMBIde+n9G2gZzwDwxrY31pZ+008Fjo9mawh9bc+czYYlCSAmPcQpxFY1+AlwNfl+mIUX0XRFMx7kpXfTxG6xUPkSE8ZRbV8u2HomCT43WCWIso22Weg SiMMQcTQv8ynitojEIRxGZcrG73HI6f9ylvpiaHZN9Mzoim2UWpu2NF0 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/iff: Only write palette to plane 1 if its PAL8 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: m2g8nYzZnpIc Fixes: null pointer passed as argument 1, which is declared to never be null Fixes: 33791/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5107575256383488.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/iff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/iff.c b/libavcodec/iff.c index b5f04e7e16..6a4c466b44 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -1847,7 +1847,8 @@ static int decode_frame(AVCodecContext *avctx, buf += s->planesize; } } - memcpy(frame->data[1], s->pal, 256 * 4); + if (avctx->pix_fmt == AV_PIX_FMT_PAL8) + memcpy(frame->data[1], s->pal, 256 * 4); } else if (s->ham) { int i, count = 1 << s->ham;