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

Commit d1d8f7de authored by Eric Sesterhenn's avatar Eric Sesterhenn Committed by Russell King
Browse files

[ARM] Off-by-one in arch/arm/common/icst*



hi,

a quick find -iname \*.[ch] | xargs grep "> ARRAY_SIZE(", revealed
these in the icst drivers.
If i == ARRAY_SIZE, we get past the idx2s array.

Signed-off-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 576b3ef2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ icst307_khz_to_vco(const struct icst307_params *p, unsigned long freq)
			break;
			break;
	} while (i < ARRAY_SIZE(idx2s));
	} while (i < ARRAY_SIZE(idx2s));


	if (i > ARRAY_SIZE(idx2s))
	if (i >= ARRAY_SIZE(idx2s))
		return vco;
		return vco;


	vco.s = idx2s[i];
	vco.s = idx2s[i];
@@ -119,7 +119,7 @@ icst307_ps_to_vco(const struct icst307_params *p, unsigned long period)
			break;
			break;
	} while (i < ARRAY_SIZE(idx2s));
	} while (i < ARRAY_SIZE(idx2s));


	if (i > ARRAY_SIZE(idx2s))
	if (i >= ARRAY_SIZE(idx2s))
		return vco;
		return vco;


	vco.s = idx2s[i];
	vco.s = idx2s[i];
+2 −2
Original line number Original line Diff line number Diff line
@@ -55,7 +55,7 @@ icst525_khz_to_vco(const struct icst525_params *p, unsigned long freq)
			break;
			break;
	} while (i < ARRAY_SIZE(idx2s));
	} while (i < ARRAY_SIZE(idx2s));


	if (i > ARRAY_SIZE(idx2s))
	if (i >= ARRAY_SIZE(idx2s))
		return vco;
		return vco;


	vco.s = idx2s[i];
	vco.s = idx2s[i];
@@ -118,7 +118,7 @@ icst525_ps_to_vco(const struct icst525_params *p, unsigned long period)
			break;
			break;
	} while (i < ARRAY_SIZE(idx2s));
	} while (i < ARRAY_SIZE(idx2s));


	if (i > ARRAY_SIZE(idx2s))
	if (i >= ARRAY_SIZE(idx2s))
		return vco;
		return vco;


	vco.s = idx2s[i];
	vco.s = idx2s[i];