The ZeroMemory() function was available in Visual C++ to fill blocks of memory with zeroes, say the password variable after authentication, or credit card details after authorization. That, however, wasn’t secure enough. The ZeroMemory function could easily get optimized out by the compiler, if the block of memory it filled was never used again. The compiler would observe that the memory being modified was never referenced again, and so silently ignore the call to ZeroMemory.
SecureZeroMemory fixes that problem. It ensures that the memory is filled with zeroes even if the memory is never used again.
SecureZeroMemory fixes that problem. It ensures that the memory is filled with zeroes even if the memory is never used again.
本文探讨了Visual C++中用于安全清除内存的SecureZeroMemory函数。该函数相较于ZeroMemory的优势在于即使被填充的内存块不再使用,也能确保其内容被彻底清零,避免敏感信息泄露。

1138

被折叠的 条评论
为什么被折叠?



