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:
 <VI1PR02MB3952E838628A8350CF4196759C1AA@VI1PR02MB3952.eurprd02.prod.outlook.com>
Date: Tue, 30 Sep 2025 10:02:01 +0000
From: David Binderman <dcb314@...mail.com>
To: "tsbogend@...ha.franken.de" <tsbogend@...ha.franken.de>,
	"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>, LKML
	<linux-kernel@...r.kernel.org>
Subject: linux-6.17/arch/mips/kernel/kgdb.c: 2 * Array sanity check in wrong
 place ? 

Hello there,

Static analyser cppcheck said:

1.

linux-6.17/arch/mips/kernel/kgdb.c:137:17: style: Array index 'regno' is used before limits check. [arrayIndexThenCheck]

Source code is

    if (dbg_reg_def[regno].offset != -1 && regno < 38) {

Maybe better code:

    if (regno < 38 && dbg_reg_def[regno].offset != -1) {

2.

linux-6.17/arch/mips/kernel/kgdb.c:170:17: style: Array index 'regno' is used before limits check. [arrayIndexThenCheck]

Duplicate.

Regards
David Binderman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ