From: Jouni Malinen Date: Sat, 5 Sep 2015 18:49:38 +0000 (+0300) Subject: WPS: Allow config_methods to be cleared with an empty string X-Git-Tag: hostap_2_5~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1067f495202b3c3aafc85f808de91faeb7a55478;p=thirdparty%2Fhostap.git WPS: Allow config_methods to be cleared with an empty string Signed-off-by: Jouni Malinen --- diff --git a/src/wps/wps_common.c b/src/wps/wps_common.c index 16d466e0a..88f85fe83 100644 --- a/src/wps/wps_common.c +++ b/src/wps/wps_common.c @@ -528,7 +528,7 @@ u16 wps_config_methods_str2bin(const char *str) { u16 methods = 0; - if (str == NULL) { + if (str == NULL || str[0] == '\0') { /* Default to enabling methods based on build configuration */ methods |= WPS_CONFIG_DISPLAY | WPS_CONFIG_KEYPAD; methods |= WPS_CONFIG_VIRT_DISPLAY;