After reading the ctrl, the pointer wasn't advanced. Any of the optional
fields following this point would have been parsed from incorrect offset
resulting in likely rejection of the message. Fix it.
Fixes: 9eb0bc1f0ae8 ("NAN: Unsynchronized service discovery (USD)")
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
sda += NAN_SERVICE_ID_LEN;
instance_id = *sda++;
req_instance_id = *sda++;
- ctrl = *sda;
+ ctrl = *sda++;
type = ctrl & NAN_SRV_CTRL_TYPE_MASK;
wpa_printf(MSG_DEBUG,
"NAN: SDA - Service ID %02x%02x%02x%02x%02x%02x Instance ID %u Requestor Instance ID %u Service Control 0x%x (Service Control Type %u)",