aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_wext.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-01-10 20:16:51 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-10 20:16:51 (GMT)
commitfbe3e7f84095ac7e44bc866ba4205aaa3e5cfcdf (patch)
tree8e242f2747de17d6e6693e005b94b5e6c7a778ba /src/drivers/driver_wext.c
parent68fd595fa5983df4f634599499a746a6e1f94e8e (diff)
downloadhostap-fbe3e7f84095ac7e44bc866ba4205aaa3e5cfcdf.zip
hostap-fbe3e7f84095ac7e44bc866ba4205aaa3e5cfcdf.tar.gz
hostap-fbe3e7f84095ac7e44bc866ba4205aaa3e5cfcdf.tar.bz2
wext: Check hexstr2bin() return value
Diffstat (limited to 'src/drivers/driver_wext.c')
-rw-r--r--src/drivers/driver_wext.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index 541ea4c..e3ec388 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -257,9 +257,9 @@ wpa_driver_wext_event_wireless_custom(void *ctx, char *custom)
bytes /= 2;
req_ies = os_malloc(bytes);
- if (req_ies == NULL)
- return;
- hexstr2bin(spos, req_ies, bytes);
+ if (req_ies == NULL ||
+ hexstr2bin(spos, req_ies, bytes) < 0)
+ goto done;
data.assoc_info.req_ies = req_ies;
data.assoc_info.req_ies_len = bytes;
@@ -277,9 +277,9 @@ wpa_driver_wext_event_wireless_custom(void *ctx, char *custom)
bytes /= 2;
resp_ies = os_malloc(bytes);
- if (resp_ies == NULL)
+ if (resp_ies == NULL ||
+ hexstr2bin(spos, resp_ies, bytes) < 0)
goto done;
- hexstr2bin(spos, resp_ies, bytes);
data.assoc_info.resp_ies = resp_ies;
data.assoc_info.resp_ies_len = bytes;
}