diff --git a/EAPMethods/src/Main.cpp b/EAPMethods/src/Main.cpp index 5d11cfe..ca032e0 100644 --- a/EAPMethods/src/Main.cpp +++ b/EAPMethods/src/Main.cpp @@ -131,6 +131,9 @@ DWORD WINAPI EapPeerGetInfo(_In_ EAP_TYPE* pEapType, _Out_ EAP_PEER_METHOD_ROUTI } +#pragma warning(push) +#pragma warning(disable: 4702) // Compiler is smart enough to find out the initialize() method is empty => never throws an exception. + /// /// Initializes an EAP peer method for EAPHost. /// @@ -162,6 +165,11 @@ DWORD APIENTRY EapPeerInitialize(_Out_ EAP_ERROR **ppEapError) return dwResult; } +#pragma warning(pop) + + +#pragma warning(push) +#pragma warning(disable: 4702) // Compiler is smart enough to find out the shutdown() method is empty => never throws an exception. /// /// Shuts down the EAP method and prepares to unload its corresponding DLL. @@ -194,6 +202,8 @@ DWORD APIENTRY EapPeerShutdown(_Out_ EAP_ERROR **ppEapError) return dwResult; } +#pragma warning(pop) + /// /// Returns the user data and user identity after being called by EAPHost. diff --git a/lib/TLS/src/Method.cpp b/lib/TLS/src/Method.cpp index f67e767..9fb0ae1 100644 --- a/lib/TLS/src/Method.cpp +++ b/lib/TLS/src/Method.cpp @@ -1326,7 +1326,7 @@ void eap::method_tls::decrypt_message(_In_ tls_message_type_t type, _Inout_ sani // Check padding. Do not throw until HMAC is calculated. // [Canvel, B., "Password Interception in a SSL/TLS Channel"](http://lasecwww.epfl.ch/memo_ssl.shtml) unsigned char padding = data.back(); - size_data = padding + 1 <= size_data ? size_data - (padding + 1) : 0; + size_data = (size_t)padding + 1 <= size_data ? size_data - (padding + 1) : 0; for (size_t i = size_data, i_end = data.size() - 1; i < i_end; i++) if (data[i] != padding) padding_ok = false;