Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define MET_NUM_VALUE_TYPES 29
- const char MET_ValueTypeName[MET_NUM_VALUE_TYPES][21] = { ... };
- bool MET_TypeToString(MET_ValueEnumType _vType, char *_s)
- {
- if(_vType>=0 && _vType<=MET_NUM_VALUE_TYPES)
- {
- strcpy(_s, MET_ValueTypeName[_vType]);
- return true;
- }
- return false;
- }
- This suspicious code was found in ITK project by PVS-Studio static code analyzer.
- Warning message is:
- V557 Array overrun is possible. The value of '_vType' index could reach 29. metautils.cxx 239
- 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