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>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A5A748D.1000109@gmail.com>
Date:	Mon, 13 Jul 2009 01:41:01 +0200
From:	Roel Kluin <roel.kluin@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] hvsi: Keep index within state_names[]

Keep index within state_names[]

Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index 2989056..05dd854 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -196,7 +196,7 @@ static inline void print_state(struct hvsi_struct *hp)
 	};
 	const char *name = state_names[hp->state];
 
-	if (hp->state > ARRAY_SIZE(state_names))
+	if (hp->state >= ARRAY_SIZE(state_names))
 		name = "UNKNOWN";
 
 	pr_debug("hvsi%i: state = %s\n", hp->index, name);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ