Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char* stringarray_at(stringarray_t*sa, int pos)
- {
- stringarray_internal_t*s =
- (stringarray_internal_t*)sa->internal;
- char *p;
- if (pos<0 || pos>=s->num)
- return 0;
- p = *(char**)&s->pos.buffer[pos*sizeof(char*)];
- if(p<0) <<<---
- return 0;
- return p;
- }
- This suspicious code was found in xpdfwin project by PVS-Studio static code analyzer.
- Warning message is:
- V503 This is a nonsensical comparison: pointer < 0. pdf2swf q.c 804
- 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