wl12xx: Check buffer bound when processing nvs data
commit9bdf7b2c8e4a92dcb16e885baec9b8edb30ced27
authorPontus Fuchs <pontus.fuchs@gmail.com>
Tue, 18 Oct 2011 07:23:42 +0000 (18 09:23 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Jan 2012 19:33:10 +0000 (12 11:33 -0800)
treebd30abb2fd148efbc94ba18d3a43e7c6ff57f93d
parent8bb12bb11ed9b5965ca86b6e3b3b94aac4ef846b
wl12xx: Check buffer bound when processing nvs data

commit f6efe96edd9c41c624c8f4ddbc4930c1a2d8f1e1 upstream.

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>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/wl12xx/boot.c