248bca32f4
See http://w1.fi/cgit/hostap/plain/wpa_supplicant/ChangeLog for list of changes since version 2.3.
28 lines
851 B
C
28 lines
851 B
C
--- src/drivers/driver_ndis.c.orig 2015-03-15 17:30:39 UTC
|
|
+++ src/drivers/driver_ndis.c
|
|
@@ -2110,7 +2110,11 @@ static int wpa_driver_ndis_get_names(str
|
|
dlen = dpos - desc;
|
|
else
|
|
dlen = os_strlen(desc);
|
|
- drv->adapter_desc = dup_binstr(desc, dlen);
|
|
+ drv->adapter_desc = os_malloc(dlen + 1);
|
|
+ if (drv->adapter_desc) {
|
|
+ os_memcpy(drv->adapter_desc, desc, dlen);
|
|
+ drv->adapter_desc[dlen] = '\0';
|
|
+ }
|
|
os_free(b);
|
|
if (drv->adapter_desc == NULL)
|
|
return -1;
|
|
@@ -2278,7 +2282,11 @@ static int wpa_driver_ndis_get_names(str
|
|
} else {
|
|
dlen = os_strlen(desc[i]);
|
|
}
|
|
- drv->adapter_desc = dup_binstr(desc[i], dlen);
|
|
+ drv->adapter_desc = os_malloc(dlen + 1);
|
|
+ if (drv->adapter_desc) {
|
|
+ os_memcpy(drv->adapter_desc, desc[i], dlen);
|
|
+ drv->adapter_desc[dlen] = '\0';
|
|
+ }
|
|
os_free(names);
|
|
if (drv->adapter_desc == NULL)
|
|
return -1;
|