wpa_supplicant: Parse int values in different bases and reject invalid
authorJohannes Berg <johannes.berg@intel.com>
Sun, 10 Mar 2013 15:55:24 +0000 (17:55 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 10 Mar 2013 15:55:24 +0000 (17:55 +0200)
commiteae3a584f5fde638e593e673cc4fda84d32689d0
treeed4bbe5c35e519db18401eb25d75e15b95ec6af8
parent725fc39e07b3a9c92fd65f6bb66402824a18dda8
wpa_supplicant: Parse int values in different bases and reject invalid

Instead of using atoi(), use strtol() which allows checking if
the configuration values are valid integers and can understand
more than just decimal (also hexadecimal and octal). This not
only allows specifying some fields in hex (which can be useful)
but also rejecting invalid configurations, e.g.,
        disassoc_low_ack=27 * 2
which was previously read as just 27.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
wpa_supplicant/config.c