Advertisement
PVS-StudioWarnings

PVS-Studio warning V575 for Scilab

Nov 21st, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. char **splitLineCSV(....)
  2. {
  3.   ....
  4.   if (retstr[curr_str] == NULL)
  5.   {
  6.     *toks = 0;
  7.     FREE(substitutedstring);
  8.     substitutedstring = NULL;
  9.     freeArrayOfString(retstr, strlen(substitutedstring));
  10.     return NULL;
  11.   }
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in Scilab project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V575 The null pointer is passed into 'strlen' function. Inspect the first argument. splitline.c 107
  18.  
  19. 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
Advertisement