Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void
- ptw32_throw (DWORD exception)
- {
- ....
- ptw32_thread_t * sp =
- (ptw32_thread_t *) pthread_getspecific (ptw32_selfThreadKey);
- sp->state = PThreadStateExiting;
- if (exception != PTW32_EPS_CANCEL &&
- exception != PTW32_EPS_EXIT)
- {
- exit (1);
- }
- ....
- if (NULL == sp || sp->implicit)
- ....
- }
- This suspicious code was found in Newton Game Dynamics project by PVS-Studio static code analyzer.
- Warning message is:
- V595 The 'sp' pointer was utilized before it was verified against nullptr. Check lines: 77, 85. ptw32_throw.c 77
- 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