Uninitialized enum higher bytes when reading as unsigned char fixed
This commit is contained in:
@@ -479,6 +479,7 @@ inline size_t pksizeof(_In_ const eap::credentials_pass::enc_alg_t &val)
|
||||
///
|
||||
inline void operator>>(_Inout_ eap::cursor_in &cursor, _Out_ eap::credentials_pass::enc_alg_t &val)
|
||||
{
|
||||
val = (eap::credentials_pass::enc_alg_t)0; // Reset higher bytes to zero before reading to lower byte.
|
||||
cursor >> (unsigned char&)val;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user