Fix buffer overflow in WIFI Extension code