From: Xi Wang Date: Thu, 29 Dec 2011 04:49:06 +0000 (-0500) Subject: panasonic-laptop: avoid overflow in acpi_pcc_hotkey_add() X-Git-Tag: v3.3~24^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e424fb8cc4e6634c10f8159b1ff5618cf7bab9c6;p=pandora-kernel.git panasonic-laptop: avoid overflow in acpi_pcc_hotkey_add() num_sifr could go negative since acpi_pcc_get_sqty() returns -EINVAL on error. Then it could bypass the sanity check (num_sifr > 255). The subsequent call to kzalloc() would allocate a small buffer, leading to a memory corruption. Signed-off-by: Xi Wang Signed-off-by: Matthew Garrett --- Reading git-diff-tree failed