From patchwork Mon Nov 23 19:37:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 23985 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 B1F3B44A49B for ; Mon, 23 Nov 2020 21:38:14 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9812468BB81; Mon, 23 Nov 2020 21:38:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6F36768B8D9 for ; Mon, 23 Nov 2020 21:38:08 +0200 (EET) Received: by mail-wm1-f68.google.com with SMTP id w24so405671wmi.0 for ; Mon, 23 Nov 2020 11:38:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=MoPids1jFp47zzrOaMY1VYIaxDQsNg14Om3SnoImYF8=; b=rHkzjpX35noaZ03e66xJrxjZbzkhEclxrQWSPPaikHL5q8JH+pFr3Tn0CmEDCAPCwQ rDgtXIdCX7akekvss0HX6FhMXTWanNZcFfJPUuL8zXaeef5bQnqeyzpDD3Z+aJaWzA3F IbLHbmk1iw8+TNiR2zr9ReNqT1t5cSzqNnmiRH1LKOM2/CvJyk2wb5MyfdmwCxNM9Z6a Sxmpaa6gztNpPKCK9kZKqsv83KZDMhiKbN56Pl4HAPTkkVViX+TcQf9+Jbpr7LiNxm27 SmDzZakT3UH5Kf98z6iImbZObk90n4QSSpwx4KBYCNCgx16kY26w9mKqjv62hDDhm2Yq 599Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=MoPids1jFp47zzrOaMY1VYIaxDQsNg14Om3SnoImYF8=; b=csDTtqI63oacl0C27tQFqYK4NFtELeeKdmgCfFjoDYwX8ajL8GgchQ2izKYlbi213P GN2iKHnmYE8OTz0z16g8au/9OgSBwokAnO+1+47Js/aUWgyFi7SwyOWYwiIdyiZjDXMK iEAagosapTQNvUMLsPwAuCNJTcr7NldJ9ucUGF/X9nl7Ink8QpZleh/HubU+perNb9Gv qrBOOsij0bmnHpNnRo9xnWp/Mwse96O2kuvTJqY5HhTCQZ/L5CNneuGqIJf3wxsLMaUe WW3kkDICFmYOyU2S+O7sSFKeoNyvtzp7eELptnrlji1GlWPo6vve5DZyHVkxPyobajfs JxRg== X-Gm-Message-State: AOAM53112O4RGXhLrDJ+0lMpROIk8cHgT4jNQtVufVsvnzgQA1LqO4lI oU2COkd0nqe/ebVVEYTNp/kd7QG8fgsSUQ== X-Google-Smtp-Source: ABdhPJyTeCuk3u21dzNvcIQktvhnt56J9SH8+vYINWxkQ0s8HRpC6Hc4lOkNCoU/kX406O48HQALYg== X-Received: by 2002:a7b:cf2b:: with SMTP id m11mr417175wmg.163.1606160287676; Mon, 23 Nov 2020 11:38:07 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc1aa4b.dynamic.kabel-deutschland.de. [188.193.170.75]) by smtp.gmail.com with ESMTPSA id e6sm564086wme.27.2020.11.23.11.38.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 11:38:07 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Nov 2020 20:37:13 +0100 Message-Id: <20201123193739.1249300-3-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201120072116.818090-1-andreas.rheinhardt@gmail.com> References: <20201120072116.818090-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 165/191] avcodec/sinewin_tablegen: Use better check in assert 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" There are no ff_sine_windows for 2^i, 0 <= i < 5, so one should check for the index being >= 5. Signed-off-by: Andreas Rheinhardt --- libavcodec/sinewin_tablegen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/sinewin_tablegen.h b/libavcodec/sinewin_tablegen.h index dc52234ed0..3c11cb6282 100644 --- a/libavcodec/sinewin_tablegen.h +++ b/libavcodec/sinewin_tablegen.h @@ -74,7 +74,7 @@ av_cold void AAC_RENAME(ff_sine_window_init)(INTFLOAT *window, int n) { } av_cold void AAC_RENAME(ff_init_ff_sine_windows)(int index) { - assert(index >= 0 && index < FF_ARRAY_ELEMS(AAC_RENAME(ff_sine_windows))); + assert(index >= 5 && index < FF_ARRAY_ELEMS(AAC_RENAME(ff_sine_windows))); #if !CONFIG_HARDCODED_TABLES AAC_RENAME(ff_sine_window_init)(AAC_RENAME(ff_sine_windows)[index], 1 << index); #endif