PVS-StudioWarnings

PVS-Studio warning V579 for Firefox

Nov 20th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1. bool HTTPUpload::SendRequest(..., int *timeout, ...)
  2. {
  3.   if (timeout) {
  4.     if (!InternetSetOption(request.get(),
  5.                            INTERNET_OPTION_SEND_TIMEOUT,
  6.                            timeout,
  7.                            sizeof(timeout))) {
  8.       fwprintf(stderr,
  9.         L"Could not unset send timeout, continuing...\n");
  10.     }
  11.   ...
  12. }
  13.  
  14. This suspicious code was found in Firefox project by PVS-Studio static code analyzer.
  15. Warning message is:
  16. V579 The InternetSetOptionW function receives the pointer and its size as arguments. It is possibly a mistake. Inspect the fourth argument. http_upload.cc 152
  17.  
  18. 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