From patchwork Tue Aug 18 19:25:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 21710 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id D5589447941 for ; Tue, 18 Aug 2020 22:33:36 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B99AC6880F0; Tue, 18 Aug 2020 22:33:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C348368803D for ; Tue, 18 Aug 2020 22:33:29 +0300 (EEST) Received: by mail-ej1-f44.google.com with SMTP id bo3so23428628ejb.11 for ; Tue, 18 Aug 2020 12:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UxH3ZlN82vV2EZAK/ksDs+PpJxHxoC4n8itHre81r0k=; b=r1c/DveRwtcoqxnJqVmrqgI2PIdz7KdB46p+fmnyObQp0boJzp0b+Il7IpVelPwdui HbVxnuqwxyyyz9TD8dedNTnRDAcz5nVI13QVEgmmUEuAA+Yqj8QaUl4jQdTFuSS1efPr W56ddrX2HMiiPhqAFo44t9Dmqh06J8fV8Z0kn1uS9HyRqFlHidlH8R9Lxg4run2+QeWe 9RM3/SQGHgKIYeRNFEjKx/qc7lo27LGuRDmB0WgNIwm+UQ3MBcAi8H2HLd9JSfhh58RQ sfbyEnQYMp9+Jkost4btivvAG6FB542VphEsJSPnl9VCt+mqVMGs+NKgv0KNnZU59oM0 deJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=UxH3ZlN82vV2EZAK/ksDs+PpJxHxoC4n8itHre81r0k=; b=feSlbuAPjDwtsB3wcQ3t7l4fI66mUPnuM15W8cOlETKHuLfZGCnPKRKbBrEVcZ/6qj uTdENHye95v5UULCn9WuxbUjzst3hbZuBdyezdzFoxFJNrFgzkutv9oTdJFi2rXIspqc RlcScEad6ItHSHSUws3doH1jlYv2uo3/VUppgJ+5oWAEkTAxucqBsJiSTVhXKa5/P3k+ EaYymGkp0+ZZMvdP+6ULwi5W7c9jCs5siD8zuqcrKgjE+b7oAcKa5T93UHGbH1daAxVl wHfEw5qJ9ZKEk5SiXkKQFKnCVWC/FjnjMbnHCM0rVyg8v42A4zD1Nm1UanoZ7/fRli8g E9kg== X-Gm-Message-State: AOAM531dEc+WlBRH5nRLuU5ftJ3ULZHDW6Eqcw2io0VzLuo4wgkPPsRI beCGCfs3TeRGoP6evHHKFG1XCWVTtqs= X-Google-Smtp-Source: ABdhPJxkFFITqWWKYBoJorbm3gU6+R2GloY4yJ9jvjIY9V9II3aJNKoZU0PaiJRewQWVlDBaBvtTUA== X-Received: by 2002:a2e:8215:: with SMTP id w21mr10293587ljg.43.1597778740320; Tue, 18 Aug 2020 12:25:40 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id 1sm6140940ljr.6.2020.08.18.12.25.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 12:25:39 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Tue, 18 Aug 2020 22:25:35 +0300 Message-Id: <20200818192538.35023-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/3] avcodec/aacdec_template: improvements to 22.2 layout logic X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The first two commits fix both of the fuzzing samples I have on hand. One being from #8845, and another provided privately by Michael. Changes have been tested both with clang 10's ASAN as well as standard valgrind. The latter 22.2 check could be simplified to just the layout (since if the stream passes all checks to that point, it probably is 22.2), but I decided to post the first version this way to show that I haven't just been sitting on my backside. The last commit is general debug logging that I found helpful during adding support of 22.2 by logging the element order before/after reorder. This one, if found non-interesting, can just be ignored. I decided to post it as it was part of my verification. Jan Ekström (3): avcodec/aacdec_template: keep tabs on layout in sniff_channel_order avcodec/aacdec_template: add more checks to make sure only 22.2 gets to 22.2 avcodec/aacdec_template: log the element order before/after reordering libavcodec/aacdec_template.c | 119 ++++++++++++++++++++++++++++------- 1 file changed, 96 insertions(+), 23 deletions(-)