Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void MD5Transform(....)
- {
- apr_uint32_t a = state[0], b = state[1],
- c = state[2], d = state[3],
- tmpbuf[APR_MD5_DIGESTSIZE];
- ....
- if (x == tmpbuf)
- {
- /* Zeroize sensitive information. */
- memset(tmpbuf, 0, sizeof(tmpbuf));
- }
- }
- This suspicious code was found in apr project by PVS-Studio static code analyzer.
- Warning message is:
- V597 The compiler could delete the 'memset' function call, which is used to flush 'tmpbuf' buffer. The RtlSecureZeroMemory() function should be used to erase the private data. libaprutil apr_md5.c 436
- 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