lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <DB6P189MB0568B264D795E66A47FC0EFB9CF2A@DB6P189MB0568.EURP189.PROD.OUTLOOK.COM>
Date:   Mon, 11 Sep 2023 16:01:43 +0000
From:   David Binderman <dcb314@...mail.com>
To:     "harry.wentland@....com" <harry.wentland@....com>,
        "sunpeng.li@....com" <sunpeng.li@....com>,
        "Rodrigo.Siqueira@....com" <Rodrigo.Siqueira@....com>,
        "alexander.deucher@....com" <alexander.deucher@....com>,
        "christian.koenig@....com" <christian.koenig@....com>,
        "Xinhui.Pan@....com" <Xinhui.Pan@....com>,
        "airlied@...il.com" <airlied@...il.com>,
        "daniel@...ll.ch" <daniel@...ll.ch>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: linux-6.6-rc1/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_resource.c:2175:26:
 style: Array index 'i' is used before limits check. [arrayIndexThenCheck]

Hello there,

Static analyser cppcheck noticed the above problem. Source code is

            if (dcfclk_sta_targets[i] < optimal_dcfclk_for_uclk[j] && i < num_dcfclk_sta_targets) {

Suggest new code:

            if (i < num_dcfclk_sta_targets && dcfclk_sta_targets[i] < optimal_dcfclk_for_uclk[j]) {

Regards

David Binderman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ