aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-04-29 16:42:49 -0700
committerDmitry Shmidt <dimitrysh@google.com>2013-04-29 16:42:49 -0700
commit4b06059785b935dd1f4f09314e4e12c417d2c6a4 (patch)
tree051e9f56fab2cd9d368ed15ff4e97c301d5a569c /src/eap_server
parent8da800a193fb6f8832218715f82a7b4e2d2ad338 (diff)
downloadandroid_external_wpa_supplicant_8-4b06059785b935dd1f4f09314e4e12c417d2c6a4.tar.gz
android_external_wpa_supplicant_8-4b06059785b935dd1f4f09314e4e12c417d2c6a4.tar.bz2
android_external_wpa_supplicant_8-4b06059785b935dd1f4f09314e4e12c417d2c6a4.zip
Accumulative patch from commit b57b560034f1bb1ad3a3892228940dde97323c0e
b57b560 wpa_supplicant: Default to nl80211 instead of wext ee28f08 hostapd: Add more messages for error paths 61d2ce2 hostapd: Reject configuration file without interface parameter a8a7890 Clear extra_blacklist_count on FLUSH command c646862 WPS ER: Allow UPnP interface to be forced 728d971 Use status code 17 (unable to handle new STA) on max-STA limitation 5e24dc8 Add dup_binstr() to help common binary string tasks 8b44ad7 Use os_zalloc() instead of os_malloc() + os_memset() 2c48211 FT RRB: Validate os_malloc() return value before using it 7ca902b Make vlan_file optional if dynamic_vlan is used bdb112d Add bitfield routines 04382f7 NFC: Add no waiting and no multiple operations options for scripts fe90496 WPS: Fix AP auto configuration on config token generation 28fcfb6 NFC: Increase wpa_cli command buffer size 8f7a6dd WPS NFC: Allow Device Password ID override for selected registrar aaecb69 WPS: Use generic MAC Address attribute builder 9ccd916 P2P: Clean up channel--frequency conversion functions e864c0a Use a common frequency to channel conversion function 02db75b FT: Reset FT flag upon STA deauthentication 7800d45 P2P: Set P2P_DEV_PEER_WAITING_RESPONSE from TX status callback d78d3c6 EAP peer: Add check before calling getSessionId method dd57970 Disable network temporarily on repeated connection failures Change-Id: If8078d5c1ff40ea806e844543cf6f2bf9d24b7ac Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/eap_server')
-rw-r--r--src/eap_server/eap_sim_db.c9
-rw-r--r--src/eap_server/tncs.c4
2 files changed, 2 insertions, 11 deletions
diff --git a/src/eap_server/eap_sim_db.c b/src/eap_server/eap_sim_db.c
index 257013e3..1b9d701e 100644
--- a/src/eap_server/eap_sim_db.c
+++ b/src/eap_server/eap_sim_db.c
@@ -1480,7 +1480,6 @@ int eap_sim_db_resynchronize(struct eap_sim_db_data *data,
*/
char * sim_get_username(const u8 *identity, size_t identity_len)
{
- char *username;
size_t pos;
if (identity == NULL)
@@ -1491,11 +1490,5 @@ char * sim_get_username(const u8 *identity, size_t identity_len)
break;
}
- username = os_malloc(pos + 1);
- if (username == NULL)
- return NULL;
- os_memcpy(username, identity, pos);
- username[pos] = '\0';
-
- return username;
+ return dup_binstr(identity, pos);
}
diff --git a/src/eap_server/tncs.c b/src/eap_server/tncs.c
index 5e332ae0..e429f1e6 100644
--- a/src/eap_server/tncs.c
+++ b/src/eap_server/tncs.c
@@ -851,12 +851,10 @@ enum tncs_process_res tncs_process_if_tnccs(struct tncs_data *tncs,
unsigned char *decoded;
size_t decoded_len;
- buf = os_malloc(len + 1);
+ buf = dup_binstr(msg, len);
if (buf == NULL)
return TNCCS_PROCESS_ERROR;
- os_memcpy(buf, msg, len);
- buf[len] = '\0';
start = os_strstr(buf, "<TNCCS-Batch ");
end = os_strstr(buf, "</TNCCS-Batch>");
if (start == NULL || end == NULL || start > end) {