From patchwork Sat Aug 13 21:50:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 37265 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp528416pzi; Sat, 13 Aug 2022 14:51:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR5U6B0aItSWFNmaV4dAg/i6qPUbhcYGUj5NkJS0tpfCsuYVIu86ZjchGexXFDakc4u3Fus7 X-Received: by 2002:a17:907:720a:b0:731:76df:5ac1 with SMTP id dr10-20020a170907720a00b0073176df5ac1mr6132194ejc.417.1660427465815; Sat, 13 Aug 2022 14:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660427465; cv=none; d=google.com; s=arc-20160816; b=nVN/HL8rtm8Szm5oWdQLAmroiPQz3CMZqLl+XqIsHCqdfJ8C8HnsmTyblV2uloZXZQ yz1VNpHsqXkWs9Gvez3QXkTl9VsJc4XgBYA3uoWe6Zyn9fWNg2ggnQ/htIti4QVNTXcM utXmNurU3/UQy00OiVWK4AHhjAxnDOtKS39vAiOVJRSwDlu/GitRJTHNGDYOCxragjVq jBKoNdmodTMcH9yJiZo9ufWsMY0vqMaT7JxKkjOSSqIGuebvfBFcPAasYgodA9OS/5Q2 rr73jwKvEiO/hLJYkZltIg0EcXC1XcA9cCnBV4tkxsFypMBzbd5qwZx7LiBoT086cslX 2Lwg== 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=KdMkvLTZrJFkDu1jdQW/8ETtDMAqsk0j+nyA8V6QSXM=; b=QcIxXbdxiK4a+i3Y6azlYl7DF7oq3pzrZlYIV38hcS2aqcO9v0QveNKN7aDJapUMdX t7lDj4MHi7xSM+z6R9gSi2Mtu5mfZIl6HtRK6LG/rCnplM9nvalytrvsp7Tfjig7vhot fqX2kxLoKqkC6ucSFPCMX6mJGwgaJZagUIaleyStD8PMXvaImxORyQpraF1rLjXhWn83 UhhynYfs8xVlznGjgGrYER8625NsILV1I0U02YnpZYUTU+F5xaFRIf9DB2HZvr+4HXqQ MPI18qLQMiDgNLqp2WGT+IjNQeRCHn2rQAs7VQs0SfCrfCDOxOPKfu69UyHgg7oCWvv0 UK1Q== 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 d11-20020aa7c1cb000000b004403b2f0179si4534346edp.515.2022.08.13.14.51.05; Sat, 13 Aug 2022 14:51:05 -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 6E90068B924; Sun, 14 Aug 2022 00:50:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-at03-2.mx.upcmail.net (vie01a-dmta-at03-2.mx.upcmail.net [62.179.121.152]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BF9DD68B82B for ; Sun, 14 Aug 2022 00:50:37 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1oMz1h-00ANWN-2b for ffmpeg-devel@ffmpeg.org; Sat, 13 Aug 2022 23:50:37 +0200 Received: from ren-mail-psmtp-mg02. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Mz14oAfd08s8UMz1goTSH6; Sat, 13 Aug 2022 23:50:36 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg02. with ESMTP id Mz1goPP6T8eSWMz1goheel; Sat, 13 Aug 2022 23:50:36 +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.4 cv=KKE5sHJo c=1 sm=1 tr=0 ts=62f81cac a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=NEAV23lmAAAA:8 a=Yug2oHul8sb0N4Xw5JgA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 13 Aug 2022 23:50:31 +0200 Message-Id: <20220813215035.12996-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfCUCXkZkzbZ+YvyIktfCLTKhPyak9dFVaBPzbrG5oCaHMwwSrXweOT7PtoDg+2NRDXttafJ7J3mEQCxcg+IsNnoPXPtGsf8mtbDq+by1siKwRLSdHORU VmR2EzlrO8E6BDVQ50vGGcsBI0LB8NdI6NbB1JOWolcsZ1ckx+zP6GqJjyuVdJVUJ8Bu8oRWGGZsew== Subject: [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO 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: JQcBa4UySqKb Fixes: Timeout Fixes: 49350/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMDVIDEO_fuzzer-4554761801695232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index e55d9fc7eb..861d201a3d 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -281,6 +281,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case AV_CODEC_ID_VC1: maxpixels /= 8192; break; case AV_CODEC_ID_VC1IMAGE: maxpixels /= 8192; break; case AV_CODEC_ID_VMNC: maxpixels /= 8192; break; + case AV_CODEC_ID_VMDVIDEO: maxpixels /= 1024; break; case AV_CODEC_ID_VP3: maxpixels /= 4096; break; case AV_CODEC_ID_VP4: maxpixels /= 4096; break; case AV_CODEC_ID_VP5: maxpixels /= 256; break; From patchwork Sat Aug 13 21:50:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 37267 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp528585pzi; Sat, 13 Aug 2022 14:51:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR4T6Tkh9WJfr+QIxfgeqS7DEqZz0NM04Vwc8K22i0nUqnxX4M0RqK6qJTPtYGWVuvAkYHs5 X-Received: by 2002:a17:907:2816:b0:731:5103:baf2 with SMTP id eb22-20020a170907281600b007315103baf2mr6244121ejc.429.1660427505118; Sat, 13 Aug 2022 14:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660427505; cv=none; d=google.com; s=arc-20160816; b=SYXgHy+JBpIsdYTHKzvL9YcfJBB9JA8pTuuS6POt0pZ8VJGI7Vo00PEd+48V6RBwub vkUISBNrQle4Jq+C7XAul5Uo3UBT1KWv2wtLWup/dfd241gzD5wTgQXC91gx/PRB7fDR 61g2CT4wo5VNHFxdSrQNFASLz3N+LK2j0BNTMTw7jCmXKtv5E0gJC4gQevklTFb4dE+y 9n/7cdfR1AunYW7K1KiWxp3flOqb0CJulz6H7SH5Hsto0GOtpIpQMYW+aMOI2V+lqlRn yusp9UXR9QC3Nh/dHaZ1yQwe2AEyvlA7M6sBhZkWzDqnY+o/vgkW0avStt5HYtskFo2h iooA== 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=wGIMXMdOnpQaa7bspq/hQxNOnGsc2xeqUyJwL/b02IE=; b=jmd4HnbuAhOHvZg7yFN4Qac19MxJD95CG9OqwxA4ggiLYMh6pJX8F/+IjICBsJZVDB hBHFmINBrV5fmz06byux85g8UaQNDqF+fo2G5a+/DDN42MDst00G/aogpf4cHS3x6un1 ELoYqrFmZGgLxtlPSuWjyjlF8FDdkOeWbmv9UKHQO/MbSwAv0t2QqtiBifllcslg7tmt h5KL+TdVZe22K4trIEgVtOLIzlAfNPRx8Ms9iunwcdHL9/aEkO2bMTZml2pI5+lv97AF mSHfshlctx6pnhgiAfryQZvIStbeUgWue3WJdBKjUtqm0YkImvZ3Yg5lhVRkJjUA4vtB szmg== 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 dm12-20020a170907948c00b00731331597e9si4322784ejc.967.2022.08.13.14.51.44; Sat, 13 Aug 2022 14:51:45 -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 B365168B915; Sun, 14 Aug 2022 00:51:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-at01-2.mx.upcmail.net (vie01a-dmta-at01-2.mx.upcmail.net [62.179.121.146]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id AA43268B178 for ; Sun, 14 Aug 2022 00:51:36 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1oMz2e-00GfDo-14 for ffmpeg-devel@ffmpeg.org; Sat, 13 Aug 2022 23:51:36 +0200 Received: from ren-mail-psmtp-mg01. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Mz2eoAhCO8s8UMz2eoTSP4; Sat, 13 Aug 2022 23:51:36 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg01. with ESMTP id Mz1goRcGAOPqFMz1goJ2OM; Sat, 13 Aug 2022 23:50:36 +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.4 cv=OcX7sjfY c=1 sm=1 tr=0 ts=62f81cac a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=NEAV23lmAAAA:8 a=EfaNEuAiC44ZH2k_WtwA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 13 Aug 2022 23:50:32 +0200 Message-Id: <20220813215035.12996-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220813215035.12996-1-michael@niedermayer.cc> References: <20220813215035.12996-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfHUq3962Gtq/FAtEH0pADrhTaeZ2xf6ViXpvplopo4vR0vCdeyyiLeWG7bGa9JtOp/hsItwpTomMSY7HhtpQIUueAuGIpboCL67J+HpuKWUJeaK/HmGK YGJ7lLZramncwSfu1K9c36uVsl2L+T958q0fUVIs9DLyujPxXUFh89Oy4TZi93sFgzCz5IhI9NHQgQ== Subject: [FFmpeg-devel] [PATCH 2/5] tools/target_dec_fuzzer: Adjust threshold for VB 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: cSfjkPMbZhFM Fixes: Timeout Fixes: 49372/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VB_fuzzer-5234505337667584 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 861d201a3d..e1b5d2b3c1 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -278,6 +278,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case AV_CODEC_ID_TQI: maxpixels /= 1024; break; case AV_CODEC_ID_TRUEMOTION2: maxpixels /= 1024; break; case AV_CODEC_ID_TSCC: maxpixels /= 1024; break; + case AV_CODEC_ID_VB: maxpixels /= 1024; break; case AV_CODEC_ID_VC1: maxpixels /= 8192; break; case AV_CODEC_ID_VC1IMAGE: maxpixels /= 8192; break; case AV_CODEC_ID_VMNC: maxpixels /= 8192; break; From patchwork Sat Aug 13 21:50:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 37263 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp528346pzi; Sat, 13 Aug 2022 14:50:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR63y7OGu3B90a4K4pQvaLU7iWlSSZH8zpXVTcQKuh0R5zEI/JI6ZTHfb2PcsUg0/+/F1wCi X-Received: by 2002:a17:906:8a52:b0:730:ab17:c7f9 with SMTP id gx18-20020a1709068a5200b00730ab17c7f9mr6316106ejc.279.1660427449454; Sat, 13 Aug 2022 14:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660427449; cv=none; d=google.com; s=arc-20160816; b=kNBeCYI3iIHvloLbMXRL13U5czRxG9ly1p9x/ozwSn3XBVsJ1eOjKvUnSs1dJgZtlR 76M/6rKi/246ntUn+DvBYUkNLNT/aXOfHa/+7afJx5zEW5SB7ME/vzbQHXvChR9Pk1fB fJd0MuCkC+ZdXau2mv8IkxamfoBhzLdINSPjdkIeonMZP8YkmLttQlVFR3NWvIHGHvmM uS1NqnhAZyzkCiyNj+IK9eOqpO5QPECqgczjiLL65n1jkyQJ3y7Gif+wrJaXIBKX8zj9 g7BXA6AYJrwpAiVJyn+q8WgKTrQFcXM3eExqQm/Jq0pdUvJ2lCDt0V0KnDPHchOa8TBm qZ3w== 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=6MwFlcWyguOGQQ4ZOZnpxIdxZvlNl7t6gO0I0dBGchg=; b=JhIzZRHoJBneXJqmrrNYSMfyHdnlBmn0SfRlFJ0vU1alU3whd5skaCoIWHLpQAH2zF 1ZUNDErOVj9YXn1lCIII+fsjLbHkZuw6Mny/3uiVBWo9app9uDKrMm6dc8YCy6Ivs40y c/gv8IhXlffh2wLwzL2nsLfIhxzM5AU7LjLN89jKuBbAsuP+SxYGmIxMz2qgktXw4Tob OomzTrqrw3sZIVz217KrR+BPqP1MzNaWWU3ucLSgPVDGFwf+keQVXPlt8ZFtwbvweFDp sxMeGxdfV1HFaJ5xE5tLBxfWsmVKhHHbhAGfDzWGnk6DJTYMQVXbmW4Fz8a2jYTTIhMT B17g== 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 y1-20020a056402358100b0043d9822b4d0si5018010edc.547.2022.08.13.14.50.48; Sat, 13 Aug 2022 14:50: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 4041768B8E7; Sun, 14 Aug 2022 00:50:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-at03-2.mx.upcmail.net (vie01a-dmta-at03-2.mx.upcmail.net [62.179.121.152]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9EEBB68B178 for ; Sun, 14 Aug 2022 00:50:37 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1oMz1h-00ANWO-58 for ffmpeg-devel@ffmpeg.org; Sat, 13 Aug 2022 23:50:37 +0200 Received: from ren-mail-psmtp-mg02. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Mz14oAfcn8s8UMz1hoTSHD; Sat, 13 Aug 2022 23:50:37 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg02. with ESMTP id Mz1hoPP6j8eSWMz1hoheeo; Sat, 13 Aug 2022 23:50:37 +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.4 cv=KKE5sHJo c=1 sm=1 tr=0 ts=62f81cad a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=NEAV23lmAAAA:8 a=fIyGdquHkijc31oSIpYA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 13 Aug 2022 23:50:33 +0200 Message-Id: <20220813215035.12996-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220813215035.12996-1-michael@niedermayer.cc> References: <20220813215035.12996-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfCUCXkZkzbZ+YvyIktfCLTKhPyak9dFVaBPzbrG5oCaHMwwSrXweOT7PtoDg+2NRDXttafJ7J3mEQCxcg+IsNnoPXPtGsf8mtbDq+by1siKwRLSdHORU VmR2EzlrO8E6BDVQ50vGGcsBI0LB8NdI6NbB1JOWolcsZ1ckx+zP6GqJjyuVdJVUJ8Bu8oRWGGZsew== Subject: [FFmpeg-devel] [PATCH 3/5] avcodec/mjpegdec: bayer and rct are incompatible 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: ESkpwkNhkVM9 Fixes: out of array read Fixes: 49434/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5208501080686592 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mjpegdec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 5f058d026f..65c3c402a2 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1092,6 +1092,10 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p return AVERROR_INVALIDDATA; if (s->v_max != 1 || s->h_max != 1 || !s->lossless) return AVERROR_INVALIDDATA; + if (s->bayer) { + if (s->rct || s->pegasus_rct) + return AVERROR_INVALIDDATA; + } s->restart_count = s->restart_interval; @@ -1942,6 +1946,8 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) } len -= 9; + if (s->bayer) + goto out; if (s->got_picture) if (rgb != s->rgb || pegasus_rct != s->pegasus_rct) { av_log(s->avctx, AV_LOG_WARNING, "Mismatching LJIF tag\n"); From patchwork Sat Aug 13 21:50:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 37264 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp528385pzi; Sat, 13 Aug 2022 14:50:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR5EZyyWq8UQuE+lLDvARSLam5Ln/WH0x7bUrdO/vFQyo3gT3pYwF+yz11Fv7OPmL28zqvLE X-Received: by 2002:a17:906:4786:b0:732:fc99:cf68 with SMTP id cw6-20020a170906478600b00732fc99cf68mr6915176ejc.18.1660427458128; Sat, 13 Aug 2022 14:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660427458; cv=none; d=google.com; s=arc-20160816; b=Bl9xtXVlaForSUTL/CSGJbKX37KfcIPvh0GA+RsAHlGpX8ruIV8842D8MyznYhz2gk OTquqWgWFm+L6O/RU0G71OBymU2OOgY5b5a8MCwxSpc5yYZYqG3aiuh7r7fKLjYk6wgB mRH+ytb8cQIsk2+eqoCAyGyNskj+vrY+zI7ovYU+iBjsoGZaFkFm8F6re2HFPUBEt9Yk 2z7Zi55lqrQcun2WQV5Uy3Pzl7XiPTxE7ZeXXLROvJswCxTDs3eb/RPzjt094JmOGN+R CtUu/Ssuo6xHtUqecY+7+XNW2EsF/QShgEAR/SnKPMm9AbuW5/NrVexdq5J7n/ijPQXf ZjJA== 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=a2oHDN5xj9FzuzL3YfoBsC3DVuxC+r993Ywcf30uGjs=; b=K547jci1t2IVe5Oo+qEiWtfRi86bbzfJu0e00GjPP/mJFM9Oyb0J3BeKMb+g1SAZpv DmvHo8WZhiajijYLutqlxq/E6TQwHV5IQrgLw6YAchl4Em5JN868hRTnGhjIj+02T1Qb 0PdW5SYmjK9on23rwFY92CRLc1ymxf2D+JNeoeMimQuZsJIl0p4ak9JKvJaMRyL0eqmR SjU5bpQOWcnSGg+O1F2A+sGl3he3GvNbkhZGlWOx7nYWgpsYa6abfZsFI78vvJUDsqqX KUu1oiQ55kYSDAjFHs/XJe0SYw76v+X4gofAFaiXb5SCqpLvI76hfBESD6d181T4EGyE Iahg== 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 h21-20020a170906111500b007307ca55581si4014665eja.47.2022.08.13.14.50.57; Sat, 13 Aug 2022 14:50:58 -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 46B8568B178; Sun, 14 Aug 2022 00:50:45 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-at03-2.mx.upcmail.net (vie01a-dmta-at03-2.mx.upcmail.net [62.179.121.152]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B117F68B773 for ; Sun, 14 Aug 2022 00:50:37 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1oMz1h-00ANSi-Ac for ffmpeg-devel@ffmpeg.org; Sat, 13 Aug 2022 23:50:37 +0200 Received: from ren-mail-psmtp-mg01. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Mz1hoAgFt8s8UMz1hoTSHE; Sat, 13 Aug 2022 23:50:37 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg01. with ESMTP id Mz1hoRcGOOPqFMz1hoJ2OO; Sat, 13 Aug 2022 23:50:37 +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.4 cv=OcX7sjfY c=1 sm=1 tr=0 ts=62f81cad a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=NEAV23lmAAAA:8 a=t1K1_VIw38opuqVvRWgA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 13 Aug 2022 23:50:34 +0200 Message-Id: <20220813215035.12996-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220813215035.12996-1-michael@niedermayer.cc> References: <20220813215035.12996-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfCUCXkZkzbZ+YvyIktfCLTKhPyak9dFVaBPzbrG5oCaHQdDE6Pfxi9cNzJVRTOdd8jjTTn66VdsoICkamXc/SSE643eFneuofJvIB0JCdAl3aR3aqEnl X3Dyb3yZT4aSyKF+099RE3VVJReBjNB542X4nz9U/BoqITalNm7Pewfn6K/N3nksw2HA5cSMF8BmLg== Subject: [FFmpeg-devel] [PATCH 4/5] avformat/subviewerdec: Make read_ts() more flexible 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: hmTaidCuArPN Fixes: signed integer overflow: -1948269928 * 10 cannot be represented in type 'int' Fixes: 49451/clusterfuzz-testcase-minimized-ffmpeg_dem_SUBVIEWER_fuzzer-6344614822412288 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg --- libavformat/subviewerdec.c | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c index e3a950fce3..6ffdc98c39 100644 --- a/libavformat/subviewerdec.c +++ b/libavformat/subviewerdec.c @@ -50,26 +50,32 @@ static int subviewer_probe(const AVProbeData *p) return 0; } +static int get_multiplier(int e) { + switch (e) { + case 1 : return 100; + case 2 : return 10; + case 3 : return 1; + default : return -1; + } +} + static int read_ts(const char *s, int64_t *start, int *duration) { int64_t end; int hh1, mm1, ss1, ms1; int hh2, mm2, ss2, ms2; - int multiplier = 1; - - if (sscanf(s, "%u:%u:%u.%2u,%u:%u:%u.%2u", - &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) { - multiplier = 10; - } else if (sscanf(s, "%u:%u:%u.%1u,%u:%u:%u.%1u", - &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) { - multiplier = 100; - } - if (sscanf(s, "%u:%u:%u.%u,%u:%u:%u.%u", - &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) { - ms1 = FFMIN(ms1, 999); - ms2 = FFMIN(ms2, 999); - end = (hh2*3600LL + mm2*60LL + ss2) * 1000LL + ms2 * multiplier; - *start = (hh1*3600LL + mm1*60LL + ss1) * 1000LL + ms1 * multiplier; + int multiplier1, multiplier2; + int ms1p1, ms1p2, ms2p1, ms2p2; + + if (sscanf(s, "%u:%u:%u.%n%u%n,%u:%u:%u.%n%u%n", + &hh1, &mm1, &ss1, &ms1p1, &ms1, &ms1p2, &hh2, &mm2, &ss2, &ms2p1, &ms2, &ms2p2) == 8) { + multiplier1 = get_multiplier(ms1p2 - ms1p1); + multiplier2 = get_multiplier(ms2p2 - ms2p1); + if (multiplier1 <= 0 ||multiplier2 <= 0) + return -1; + + end = (hh2*3600LL + mm2*60LL + ss2) * 1000LL + ms2 * multiplier2; + *start = (hh1*3600LL + mm1*60LL + ss1) * 1000LL + ms1 * multiplier1; *duration = end - *start; return 0; } From patchwork Sat Aug 13 21:50:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 37266 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3d0d:b0:8d:a68e:8a0e with SMTP id y13csp528445pzi; Sat, 13 Aug 2022 14:51:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR5/nIjulg5zHJ85AisB7cVHTPoTXOf6YcBqyNWzTWCX6ulUt6q0vJ3nfkqNUK15akV/MBRj X-Received: by 2002:a17:907:969f:b0:730:df57:123d with SMTP id hd31-20020a170907969f00b00730df57123dmr6527297ejc.430.1660427473289; Sat, 13 Aug 2022 14:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660427473; cv=none; d=google.com; s=arc-20160816; b=RIsfkxGe9G7bj2xkh5RfP3N/MIeBFuNG/xclA9JRhjFHg481JGEdZhiyJtaWJSEu5Z zHNx762AHCsc5feymVCkjTBtiZREyHXsqEx+Lt8xVme2VEXY5RItp3Zs+a9h/u1GACuV khj0XUYSPWREcajIwHqxUuuv9gKRFCJZIDYYE4Fqg22/Cc+LxyydHyzO1mAHCpN+ln6u ESo3iFTKnvyavyeZ/GDtACG9H91CkX5BB9TDtgdpE3csyA+XYuKXvSwey745MZ0MUnMG 6mJRl8pRWu0h2BNzAhCtVhe6UQcx+b1POb2oEIPrl7IRBQPcw8usznnPHX59AWZCd+he dbZw== 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=i0s0Ky656GxLW+Ph1f3/Y/ml14zN05+jNfx033stvo4=; b=ad5rtPt+TTfFh4wCX7c2NXaYIq3+gkk1YAfpzJ7dGs8dt7beZIPavWFF52wl2WS2jO 1Zgujr9ajVguVS28a4ozHzUkNkLUqzA5E7MogC7RQukIey0bVRJZ33DsffYQxlXe4cAR STrmm1J4Wsxjo7NnEpj7z8FX6snfh5rKDkOY3GieYPRYv9Xb4hX9KaehFr8WrDIT11ti n4CAZU+2Coa848SqFCuwg7IwStSoka3H3kkP45L4GKCAfOf+hVBnoasNRtnVA3bYYAyX G31/NCNvNdHNowjnxnrUsiPb7ZSaitYgpJ+VnWRJVmeeFNMAqvTuP6xZ2Tmt6p56V7NR rUjw== 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 d23-20020a50f697000000b0043cb489640bsi5170045edn.362.2022.08.13.14.51.12; Sat, 13 Aug 2022 14:51:13 -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 8896068B82B; Sun, 14 Aug 2022 00:50:47 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-at01-2.mx.upcmail.net (unknown [62.179.121.146]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E2A168B82B for ; Sun, 14 Aug 2022 00:50:38 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-at01.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1oMz1h-00GgHq-MW for ffmpeg-devel@ffmpeg.org; Sat, 13 Aug 2022 23:50:37 +0200 Received: from ren-mail-psmtp-mg02. ([80.109.253.241]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id Mz14oAfd08s8UMz1hoTSHH; Sat, 13 Aug 2022 23:50:37 +0200 Received: from localhost ([213.47.68.29]) by ren-mail-psmtp-mg02. with ESMTP id Mz1hoPP6v8eSWMz1hoheer; Sat, 13 Aug 2022 23:50:37 +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.4 cv=KKE5sHJo c=1 sm=1 tr=0 ts=62f81cad a=2hcxjKEKjp0CzLx6oWAm4g==:117 a=2hcxjKEKjp0CzLx6oWAm4g==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=NEAV23lmAAAA:8 a=JaXW8oNh8n8vpOQF9X8A:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 13 Aug 2022 23:50:35 +0200 Message-Id: <20220813215035.12996-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220813215035.12996-1-michael@niedermayer.cc> References: <20220813215035.12996-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfCUCXkZkzbZ+YvyIktfCLTKhPyak9dFVaBPzbrG5oCaHMwwSrXweOT7PtoDg+2NRDXttafJ7J3mEQCxcg+IsNnoPXPtGsf8mtbDq+by1siKwRLSdHORU VmR2EzlrO8E6BDVQ50vGGcsBI0LB8NdI6NbB1JOWolcsZ1ckx+zP6GqJjyuVdJVUJ8Bu8oRWGGZsew== Subject: [FFmpeg-devel] [PATCH 5/5] avcodec/4xm: treat AV_LOG_ERROR cases as errors 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: N7WBA0r6RO1t Fixes: Timeout Fixes: 49504/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-570457772222054 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/4xm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 8941d715fa..a7c9043b0a 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -950,9 +950,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture, } else if (frame_4cc == AV_RL32("snd_")) { av_log(avctx, AV_LOG_ERROR, "ignoring snd_ chunk length:%d\n", buf_size); + return AVERROR_INVALIDDATA; } else { av_log(avctx, AV_LOG_ERROR, "ignoring unknown chunk length:%d\n", buf_size); + return AVERROR_INVALIDDATA; } picture->key_frame = picture->pict_type == AV_PICTURE_TYPE_I;