Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static Activity DetermineExpressionMoveActivity(
- CChoreoEvent *event, CAI_BaseNPC *pNPC )
- {
- ....
- const char *pszAct = Q_strstr( sParam2, " " );
- if ( pszAct )
- {
- char szActName[256];
- Q_strncpy( szActName, sParam2, sizeof(szActName) );
- szActName[ (pszAct-sParam2) ] = '\0';
- pszAct = szActName;
- }
- ....
- }
- This suspicious code was found in Source SDK project by PVS-Studio static code analyzer.
- Warning message is:
- V507 Pointer to local array 'szActName' is stored outside the scope of this array. Such a pointer will become invalid. Server (HL2) baseflex.cpp 1326
- 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