WiFi: Check data length before extracting

GBK to UTF convertion is carried on input data. The maximum data
that can be supported in framework is BUF_SIZE.
The gerrit is to check the size of input data  prior to parsing,
so that it will not lead to any crashes.

Change-Id: If8ff372dc26317b369643405dcea01ff28c4f1f3
CRs-Fixed: 708416