From patchwork Tue Sep 21 23:14:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 30435 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp2895675iob; Tue, 21 Sep 2021 16:15:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq/Q2QIXB10pcjHJFDRnxiO3gF+1Ucr/+Zu8mN8zr22S6Okb0lGB+MPvPeBYGoSoaze2RO X-Received: by 2002:a05:6402:411:: with SMTP id q17mr38607560edv.35.1632266151246; Tue, 21 Sep 2021 16:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632266151; cv=none; d=google.com; s=arc-20160816; b=a/42p34FkRZGzKcTIrZcdtXMrk+8iCZurEEhqZTGdWAlcq5PsbN30Cw6b7RRvku8eL fntVVbp6EcpWMjYcVdbPeKczxMPdayXs5frvNAxn45c+nHtaoyzfSf6F2O2ZSprqi4uh eVY1zXGv9fc5jDmN9+cZ5pHJ4t224JfGULEMaRRIwTz9hSEejcLOFw/RSKZQqakqx1G0 UIyqdgkZiF3b2CteoLu/ro7n3mOtv0izwr6Xc/6tvB+JsFiRNZ+8Klf7hpLRDiTCMJ/a 4JBYaboxkn1+vqeQeAM8r20sJMDGBySg232bYmy18/1xDfnpbz+PufMf0IsrvECLjVDQ WZdg== 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=O+05EKx0wDDK0DdyL0vNQ9jVt7ojTkf8Fo4a3eFskRM=; b=CpED/XuYToRM3TQxecH7bF3e3n1ewJtbQ0r42JoI/M+I5BGiVTMNAsvlXbFnbXeYJY cwvKOS3rOjAC88w1+kFLe+CbYzqUDmfkAay0V5elItqRPTna3mq7WShIX26a96oTO+oO rySOshFh5/8EzaSarmo9s5HYKn5fZrt5XHilVPEli7Aze4xQA1zQYSxFmIkPYHZPLkDW dAIEyr+k/aXWjJA/hxS60VJv85pOHiceK6NAPD3OrAxDIuqvwc2Ya8lZY5mOF5QG9qaQ s7XPtxpcqQk95zOTt2p5Ny0RJUbY1QTUHmaDEvx22PgaakUdtamJdvsC8wdcvl6y11ey 9bRw== 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 u10si491219eji.157.2021.09.21.16.15.50; Tue, 21 Sep 2021 16:15:51 -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 4A23568AF83; Wed, 22 Sep 2021 02:15:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-3.mx.upcmail.net (vie01a-dmta-pe03-3.mx.upcmail.net [62.179.121.162]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C159668AE6B for ; Wed, 22 Sep 2021 02:15:39 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1mSozD-0040iL-0d for ffmpeg-devel@ffmpeg.org; Wed, 22 Sep 2021 01:15:39 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id SoyEmwAUcljeHSoyEmXltT; Wed, 22 Sep 2021 01:14:39 +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=vI8K51RHdONwcLWvhtcA:9 a=1fhp2MxaeJtTNGEnv6mo:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 22 Sep 2021 01:14:37 +0200 Message-Id: <20210921231438.16335-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4wfEpIIWmyzz0A7+8MJ/8V2AQwLxjZLouX/N1LmXw84TgwYhk55oE+5WGKkmCKl+7jlv+3qTwLq6FexDWxfDmXaRy+ps+s0qzQXe+DCvOVuFwJF6KR+LJj U4mxW0MjPLgr9t1Hbvwz+YM5qZbxqdb25X6K6qzis5ta5+GirzsjCNA3 Subject: [FFmpeg-devel] [PATCH 1/2] avformat/concatdec: Use FAIL() macro instead of direct return in concat_parse_script() 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: 9Dt8Q9NAIKmf Fixes: memleak Fixes: 38893/clusterfuzz-testcase-minimized-ffmpeg_dem_CONCAT_fuzzer-4785231933079552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/concatdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/concatdec.c b/libavformat/concatdec.c index 0886dad88b2..2557f38b26c 100644 --- a/libavformat/concatdec.c +++ b/libavformat/concatdec.c @@ -627,7 +627,7 @@ static int concat_parse_script(AVFormatContext *avf) chapter = avpriv_new_chapter(avf, arg_int[0], AV_TIME_BASE_Q, arg_int[1], arg_int[2], NULL); if (!chapter) - return AVERROR(ENOMEM); + FAIL(ENOMEM); break; default: From patchwork Tue Sep 21 23:14:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 30436 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:6506:0:0:0:0:0 with SMTP id z6csp2899399iob; Tue, 21 Sep 2021 16:21:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0BdLQfaGAlezr8BmbdPRKzQt7/6P7a835aZiRgAaIai8weH/eewfjUtyE0epTOSQE6WND X-Received: by 2002:a17:906:af91:: with SMTP id mj17mr15495470ejb.266.1632266495240; Tue, 21 Sep 2021 16:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632266495; cv=none; d=google.com; s=arc-20160816; b=EtUsf+pjJD3PyKe65ZvHBsSW/ZYgLIV+3uZiSvNExSAiLwPjffZoLsxKZde8TWzCfH ln/69JYC0x4M99rUfP8DqIKPrW/0XA++u6MxW4UAqczeejwI8YXylhA+RkWdaLBPjQTn B4Wf7/hLTFJPXtphw31Mdg01ngHOGVzeaviGJz3bTA/c1E3ZpZWw3MVzn5s2uXbYm4hi GPo+2x1jIChPnjFLY4IN4jYKX5vf3KdLTgMfv2tgv/v/Jv9SFXgN2Q5t4wyi6i2Te1uk ZrX8VgrfiKtB2uFV/PJ6wshOK/rnh/kJBKl9enVC8f64LISZ9vy7qDBCjzzL/wVVXhtx ScGQ== 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=4NEWC/8U/3Vbqfte8282XhDd0aTO0q6THHdb98//+xo=; b=T78AxJSV3Sj+zPptD7ei1f3PJI5yuAjQdNpQsneVFqP9JUNnVLUG6MSrZjDbKV3eg/ PfuVqqlPSTFw/KqT+Pvn/qfAOQhuO/bj7hU+QFafm2CYQ2nj5mqQQHfYdMXNrNz7KbY5 Ljyi2J1HxP5ytyfAu8fRhJRBCkzWF9ZYmN7Ue7S4ymgm/+z5WabYQvcbB/JpPjnrvjGa McGZEt5k11y2qiVH9YQpRkbZlgMnwALhZyopT6+Tx16R3OES2vKxQgT/nurRMFRy4KuL fNv5FDga4GLDKeNlDndm82b4jAABZ/Jv4ux3vU/qjE9/E0Xpb8ARevTlw8B1AZM6pENU jOqw== 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 5si525031ejm.327.2021.09.21.16.21.34; Tue, 21 Sep 2021 16:21:35 -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 E52F968AE6D; Wed, 22 Sep 2021 02:21:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe05-3.mx.upcmail.net (vie01a-dmta-pe05-3.mx.upcmail.net [84.116.36.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0292868A817 for ; Wed, 22 Sep 2021 02:21:26 +0300 (EEST) Received: from [172.31.216.235] (helo=vie01a-pemc-psmtp-pe12.mail.upcmail.net) by vie01a-dmta-pe05.mx.upcmail.net with esmtp (Exim 4.92) (envelope-from ) id 1mSozD-009f3J-0d for ffmpeg-devel@ffmpeg.org; Wed, 22 Sep 2021 01:15:39 +0200 Received: from localhost ([213.47.68.29]) by vie01a-pemc-psmtp-pe12.mail.upcmail.net with ESMTP id SoyFmwAW4ljeHSoyFmXluN; Wed, 22 Sep 2021 01:14:39 +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=Wtkdgx6NUtjDrLC6-jwA:9 a=1fhp2MxaeJtTNGEnv6mo:22 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 22 Sep 2021 01:14:38 +0200 Message-Id: <20210921231438.16335-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210921231438.16335-1-michael@niedermayer.cc> References: <20210921231438.16335-1-michael@niedermayer.cc> X-CMAE-Envelope: MS4wfEpIIWmyzz0A7+8MJ/8V2AQwLxjZLouX/N1LmXw84TgwYhk55oE+5WGKkmCKl+7jlv+3qTwLq6FexDWxfDmXaRy+ps+s0qzQXe+DCvOVuFwJF6KR+LJj U4mxW0MjPLgr9t1Hbvwz+YM5qZbxqdb25X6K6qzis5ta5+GirzsjCNA3 Subject: [FFmpeg-devel] [PATCH 2/2] avcodec/apedec: Use unsigned in long_filter_ehigh_3830() to avoid undefined overflow 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: 9J7XOM4cvhfU Fixes: signed integer overflow: -2145648640 - 3357696 cannot be represented in type 'int' Fixes: 38899/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-535881501756620 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/apedec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 050523601d5..57d6de64cdf 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -979,7 +979,7 @@ static void long_filter_ehigh_3830(int32_t *buffer, int length) for (j = 7; j > 0; j--) delay[j] = delay[j - 1]; delay[0] = buffer[i]; - buffer[i] -= dotprod >> 9; + buffer[i] -= (unsigned)(dotprod >> 9); } }