Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 637f23ab authored by Dan Carpenter's avatar Dan Carpenter Committed by Chris Metcalf
Browse files

tile: array underflow in setup_maxnodemem()



My static checker correctly complains that we should have a lower bound
on "node" to prevent an array underflow.

Fixes: 867e359b ("arch/tile: core support for Tilera 32-bit chips.")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarChris Metcalf <cmetcalf@mellanox.com>
parent 7c88f2bf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ static int __init setup_maxnodemem(char *str)
{
	char *endp;
	unsigned long long maxnodemem;
	long node;
	unsigned long node;

	node = str ? simple_strtoul(str, &endp, 0) : INT_MAX;
	if (node >= MAX_NUMNODES || *endp != ':')