Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void MD4Engine::transform (UInt32 state[4],
- const unsigned char block[64])
- {
- UInt32 a = state[0], b = state[1],
- c = state[2], d = state[3], x[16];
- decode(x, block, 64);
- ....
- /* Zeroize sensitive information. */
- std::memset(x, 0, sizeof(x));
- }
- This suspicious code was found in Poco project by PVS-Studio static code analyzer.
- Warning message is:
- V597 The compiler could delete the 'memset' function call, which is used to flush 'x' buffer. The RtlSecureZeroMemory() function should be used to erase the private data. Foundation md4engine.cpp 272
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment