diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2011-04-13 23:10:21 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-04-13 23:10:21 +0300 |
commit | f8b5f7dc6b24c365d723144aceb3c856d9b61abb (patch) | |
tree | 68f37eb96b78d36e633fb4dbb1cedf189bf1f3e1 /src/eap_server | |
parent | a04bf77209ea23f5a86d0d075fd1cdae3479212c (diff) | |
download | external_wpa_supplicant_8_ti-f8b5f7dc6b24c365d723144aceb3c856d9b61abb.zip external_wpa_supplicant_8_ti-f8b5f7dc6b24c365d723144aceb3c856d9b61abb.tar.gz external_wpa_supplicant_8_ti-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_server')
-rw-r--r-- | src/eap_server/tncs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/eap_server/tncs.c b/src/eap_server/tncs.c index 497b51a..637b6f8 100644 --- a/src/eap_server/tncs.c +++ b/src/eap_server/tncs.c @@ -234,11 +234,11 @@ TNC_Result TNC_TNCS_ReportMessageTypes( return TNC_RESULT_INVALID_PARAMETER; os_free(imv->supported_types); imv->supported_types = - os_malloc(typeCount * sizeof(TNC_MessageTypeList)); + os_malloc(typeCount * sizeof(TNC_MessageType)); if (imv->supported_types == NULL) return TNC_RESULT_FATAL; os_memcpy(imv->supported_types, supportedTypes, - typeCount * sizeof(TNC_MessageTypeList)); + typeCount * sizeof(TNC_MessageType)); imv->num_supported_types = typeCount; return TNC_RESULT_SUCCESS; |