wl12xx: Check buffer bound when processing nvs data
authorPontus Fuchs <pontus.fuchs@gmail.com>
Tue, 18 Oct 2011 07:23:42 +0000 (09:23 +0200)
committerLuciano Coelho <coelho@ti.com>
Thu, 1 Dec 2011 13:55:42 +0000 (15:55 +0200)
commitf6efe96edd9c41c624c8f4ddbc4930c1a2d8f1e1
tree45c3098bce60b712b9a33a4fbfef73a5b6c030c3
parent2131d3c2f99b081806fdae7662c92fe6acda52af
wl12xx: Check buffer bound when processing nvs data

An nvs with malformed contents could cause the processing of the
calibration data to read beyond the end of the buffer. Prevent this
from happening by adding bound checking.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: stable@kernel.org
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/boot.c