From a867076c3ebf6742b96c03c3fd69ea6a54695e33 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 18 Aug 2016 16:48:13 -0500 Subject: [PATCH] wscutil: Relax OS_VERSION parser Apple implementations seem to not set the MSB bit to 1. --- src/wscutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wscutil.c b/src/wscutil.c index 0bd27e65..41e447e3 100644 --- a/src/wscutil.c +++ b/src/wscutil.c @@ -356,10 +356,10 @@ static bool extract_os_version(struct wsc_attr_iter *iter, void *data) * The OS Version component indicates what operating system is running * on the device. It is a four-byte field. The most significant bit is * reserved and always set to one. + * + * We do not strictly check this as at least Apple's WPS implementation + * does not set the MSB to 1. */ - if ((v & 0x80000000) == 0) - return false; - *out = v & 0x7fffffff; return true; }