panasonic-laptop: avoid overflow in acpi_pcc_hotkey_add()
authorXi Wang <xi.wang@gmail.com>
Thu, 29 Dec 2011 04:49:06 +0000 (23:49 -0500)
committerMatthew Garrett <mjg@redhat.com>
Mon, 12 Mar 2012 14:25:51 +0000 (10:25 -0400)
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 <xi.wang@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

No differences found