Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CVariable {
- public:
- char name[64]; // Name as it is referenced
- ...
- };
- void CRendererContext::RiGeometryV(
- char *type,int n,char *tokens[],void *params[])
- {
- ...
- } else {
- CVariable var;
- if (parseVariable(&var,NULL,tokens[i])) {
- tokens[i] = var.name;
- i--;
- } else {
- error(CODE_BADTOKEN,
- "Unrecognised implicit parameter: %s\n",tokens[i]);
- }
- }
- ...
- }
- This suspicious code was found in Pixie project by PVS-Studio static code analyzer.
- Warning message is:
- V507 Pointer to local array 'var' is stored outside the scope of this array. Such a pointer will become invalid. ri renderer.cpp 5974
- 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