Re: [PATCH v6] input: tegra-kbc - Add tegra keyboard driver

From: Dmitry Torokhov
Date: Wed Jan 19 2011 - 17:58:45 EST


On Wed, Jan 19, 2011 at 02:30:07PM -0800, riyer@xxxxxxxxxx wrote:
> +
> +static void tegra_kbc_report_keys(struct tegra_kbc *kbc)
> +{
> + unsigned char scancodes[KBC_MAX_KPENT];
> + unsigned short keycodes[KBC_MAX_KPENT];
> + u32 val = 0;
> + unsigned int i;
> + unsigned int num_down = 0;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&kbc->lock, flags);
> + for (i = 0; i < KBC_MAX_KPENT * 4; i++) {

This will cause going beyond scancodes[] and keycodes[] and stomping on
your stack...

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/