Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DWORD SNMP_PDU::encodeV3SecurityParameters(
- BYTE *buffer, DWORD bufferSize,
- SNMP_SecurityContext *securityContext)
- {
- BYTE securityParameters[1024], sequence[1040];
- DWORD bytes;
- DWORD engineBoots =
- securityContext->getAuthoritativeEngine().getBoots();
- DWORD engineTime =
- securityContext->getAuthoritativeEngine().getTime();
- if ((securityContext != NULL) &&
- (securityContext->getSecurityModel() ==
- SNMP_SECURITY_MODEL_USM))
- {
- ....
- }
- This suspicious code was found in NetXMS project by PVS-Studio static code analyzer.
- Warning message is:
- V595 The 'securityContext' pointer was utilized before it was verified against nullptr. Check lines: 1159, 1162. pdu.cpp 1159
- 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
Advertisement