]> git.baikalelectronics.ru Git - kernel.git/commit
p54: fix eeprom parser length sanity checks
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 29 Feb 2008 22:28:25 +0000 (23:28 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 4 Mar 2008 23:36:36 +0000 (18:36 -0500)
commit98de3fd20948914f23c7303477e1cdb3339ea3f8
tree7879c02aa491f6e335dd907b1093941bfb892215
parentc87b7cf03f4b2287fccb5de1c00d8afa310cc2f4
p54: fix eeprom parser length sanity checks

When I called p54_parse_eeprom() on a hand-coded structure
I managed to make a small mistake with wrap->len which caused
a segfault a few lines down when trying to read entry->len.
This patch changes the validation code to avoid such problems.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/p54common.c