PVS-StudioWarnings

PVS-Studio warning V575 for ReactOS

Nov 20th, 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. VOID WinLdrSetupEms(IN PCHAR BootOptions)
  2. {
  3.   PCHAR RedirectPort;
  4.   ....
  5.   RedirectPort = strstr(RedirectPort, "com");
  6.   if (RedirectPort)
  7.   {
  8.     ....
  9.   }
  10.   else
  11.   {
  12.     RedirectPort = strstr(RedirectPort, "usebiossettings");
  13.   ....
  14. }
  15.  
  16. This suspicious code was found in ReactOS project by PVS-Studio static code analyzer.
  17. Warning message is:
  18. V575 The null pointer is passed into 'strstr' function. Inspect the first argument. headless.c 263
  19.  
  20. 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