char *genie, *gpos, *gend;
u8 *tmp;
+ if (iwe->u.data.length == 0)
+ return;
+
gpos = genie = custom;
gend = genie + iwe->u.data.length;
if (gend > end) {
int bytes;
spos = custom + 7;
bytes = custom + clen - spos;
- if (bytes & 1)
+ if (bytes & 1 || bytes == 0)
return;
bytes /= 2;
tmp = os_realloc(res->ie, res->ie_len + bytes);
int bytes;
spos = custom + 7;
bytes = custom + clen - spos;
- if (bytes & 1)
+ if (bytes & 1 || bytes == 0)
return;
bytes /= 2;
tmp = os_realloc(res->ie, res->ie_len + bytes);