aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/tncc.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-04-13 20:10:21 (GMT)
committerJouni Malinen <j@w1.fi>2011-04-13 20:10:21 (GMT)
commitf8b5f7dc6b24c365d723144aceb3c856d9b61abb (patch)
tree68f37eb96b78d36e633fb4dbb1cedf189bf1f3e1 /src/eap_peer/tncc.c
parenta04bf77209ea23f5a86d0d075fd1cdae3479212c (diff)
downloadhostap-f8b5f7dc6b24c365d723144aceb3c856d9b61abb.zip
hostap-f8b5f7dc6b24c365d723144aceb3c856d9b61abb.tar.gz
hostap-f8b5f7dc6b24c365d723144aceb3c856d9b61abb.tar.bz2
TNC: Fix TNC_{TNCC,TNCS}_ReportMessageTypes copy type
The supportedTypes parameter is a list of TNC_MessageType values and the buffer to be copied should use size of TNC_MessageType, not TNC_MessageTypeList. In practice, these are of same length on most platforms, so this is not a critical issue, but anyway, the correct type should be used.
Diffstat (limited to 'src/eap_peer/tncc.c')
-rw-r--r--src/eap_peer/tncc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eap_peer/tncc.c b/src/eap_peer/tncc.c
index eaaa168..a70d70c 100644
--- a/src/eap_peer/tncc.c
+++ b/src/eap_peer/tncc.c
@@ -180,11 +180,11 @@ TNC_Result TNC_TNCC_ReportMessageTypes(
imc = tnc_imc[imcID];
os_free(imc->supported_types);
imc->supported_types =
- os_malloc(typeCount * sizeof(TNC_MessageTypeList));
+ os_malloc(typeCount * sizeof(TNC_MessageType));
if (imc->supported_types == NULL)
return TNC_RESULT_FATAL;
os_memcpy(imc->supported_types, supportedTypes,
- typeCount * sizeof(TNC_MessageTypeList));
+ typeCount * sizeof(TNC_MessageType));
imc->num_supported_types = typeCount;
return TNC_RESULT_SUCCESS;