tmp = os_realloc(res->ie, res->ie_len + bytes);
if (tmp == NULL)
return;
- hexstr2bin(spos, tmp + res->ie_len, bytes);
res->ie = tmp;
+ if (hexstr2bin(spos, tmp + res->ie_len, bytes) < 0)
+ return;
res->ie_len += bytes;
} else if (clen > 7 && os_strncmp(custom, "rsn_ie=", 7) == 0) {
char *spos;
tmp = os_realloc(res->ie, res->ie_len + bytes);
if (tmp == NULL)
return;
- hexstr2bin(spos, tmp + res->ie_len, bytes);
res->ie = tmp;
+ if (hexstr2bin(spos, tmp + res->ie_len, bytes) < 0)
+ return;
res->ie_len += bytes;
} else if (clen > 4 && os_strncmp(custom, "tsf=", 4) == 0) {
char *spos;
return;
}
bytes /= 2;
- hexstr2bin(spos, bin, bytes);
+ if (hexstr2bin(spos, bin, bytes) < 0) {
+ wpa_printf(MSG_DEBUG, "WEXT: Invalid TSF value");
+ return;
+ }
res->res.tsf += WPA_GET_BE64(bin);
}
}