To get a trial key
fill out the form below
Team License (standard version)
Enterprise License (extended version)
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Request our prices
New License
License Renewal
--Select currency--
USD
EUR
GBP
RUB
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
To get the licence for your open-source project, please fill out this form
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
I am interested to try it on the platforms:
* By clicking this button you agree to our Privacy Policy statement

** This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
Examples of errors detected by the V617…

Examples of errors detected by the V617 diagnostic

Apr 05 2021

V617. Consider inspecting the condition. An argument of the '|' bitwise operation always contains a non-zero value.


ffdshow

V617 Consider inspecting the condition. The '0x0002' argument of the '|' bitwise operation contains a non-zero value. tffdshowpageenc.cpp 425


#define ODA_SELECT 0x0002

INT_PTR TffdshowPageEnc::msgProc(UINT uMsg, WPARAM wParam,
                                            LPARAM lParam)
{
  ....
  if ((dis->itemAction | ODA_SELECT)
    && (dis->itemState & ODS_SELECTED)) {
  ....
}

ABackup

V617 Consider inspecting the condition. The '0x00000001' argument of the '|' bitwise operation contains a non-zero value. kitcpp.cpp 304


#define FILE_ATTRIBUTE_READONLY 0x00000001

BOOL DeleteAnyFile( char* cFileName ) {
  ....
  if ( nAttr | FILE_ATTRIBUTE_READONLY ) {
    nAttr &= ~FILE_ATTRIBUTE_READONLY ;
    SetFileAttributes( cFileName, nAttr ) ;
  }
  ....
}

ResizableLib

V617 Consider inspecting the condition. The '0x00000800' argument of the '|' bitwise operation contains a non-zero value. resizablepageex.cpp 88


#define PSP_HIDEHEADER 0x00000800

BOOL CResizablePageEx::NeedsRefresh(....)
{
  if (m_psp.dwFlags | PSP_HIDEHEADER)
    return TRUE;
  ....
}

OpenSSL

V617 Consider inspecting the condition. The '0x0010' argument of the '|' bitwise operation contains a non-zero value. s3_srvr.c 2343


#define EVP_PKT_SIGN 0x0010

int ssl3_get_cert_verify(SSL *s)
{
  int type=0, i, j;
  ....
  if ((peer != NULL) && (type | EVP_PKT_SIGN))
  ....
}

Multi Theft Auto

V617 Consider inspecting the condition. The '0x00000002l' argument of the '|' bitwise operation contains a non-zero value. cproxydirect3ddevice9.cpp 520


#define D3DCLEAR_ZBUFFER 0x00000002l

HRESULT CProxyDirect3DDevice9::Clear(....)
{
  if ( Flags | D3DCLEAR_ZBUFFER )
    CGraphics::GetSingleton().
      GetRenderItemManager ()->SaveReadableDepthBuffer();
  ....
}

Similar errors can be found in some other places:

  • V617 Consider inspecting the condition. The '0x00080000' argument of the '|' bitwise operation contains a non-zero value. cvehiclesa.cpp 1791

Word for Windows 1.1a

V617 Consider inspecting the condition. The '(0x0008 + 0x2000 + 0x4000)' argument of the '|' bitwise operation contains a non-zero value. dlgmisc.c 409


....
#define wkHdr    0x4000
#define wkFtn    0x2000
#define wkAtn    0x0008
....
#define wkSDoc    (wkAtn+wkFtn+wkHdr)

CMD CmdGoto (pcmb)
CMB * pcmb;
{
  ....
  int wk = PwwdWw(wwCur)->wk;
    if (wk | wkSDoc)
      NewCurWw((*hmwdCur)->wwUpper, fTrue);
  ....
}

Most likely this is what should be written here: if (wk & wkSDoc)


WebRTC

V617 Consider inspecting the condition. The 'MAYBE_LOCAL_SSRC' argument of the '|' bitwise operation contains a non-zero value. mediapipelinefilter.cpp 118


static const uint8_t MAYBE_LOCAL_SSRC = 1;

bool MediaPipelineFilter::CheckRtcpSsrc(
  const unsigned char* data,
  size_t len,
  size_t ssrc_offset,
  uint8_t flags) const
{
  ....
  if (flags | MAYBE_LOCAL_SSRC) {
  ....
}

Similar errors can be found in some other places:

  • V617 Consider inspecting the condition. The 'MAYBE_REMOTE_SSRC' argument of the '|' bitwise operation contains a non-zero value. mediapipelinefilter.cpp 124

FreeBSD Kernel

V617 Consider inspecting the condition. The '0x00000080' argument of the '|' bitwise operation contains a non-zero value. mac_bsdextended.c 128


#define  MBO_TYPE_DEFINED 0x00000080

static int
ugidfw_rule_valid(struct mac_bsdextended_rule *rule)
{
  ....
  if ((rule->mbr_object.mbo_neg | MBO_TYPE_DEFINED) &&      // <=
      (rule->mbr_object.mbo_type | MBO_ALL_TYPE) != MBO_ALL_TYPE)
    return (EINVAL);
  if ((rule->mbr_mode | MBI_ALLPERM) != MBI_ALLPERM)
    return (EINVAL);
  return (0);
}

XNU kernel

V617 CWE-480 Consider inspecting the condition. The '0x0001' argument of the '|' bitwise operation contains a non-zero value. nfs_upcall.c 331


#define NFS_UC_QUEUE_SLEEPING  0x0001

static void
nfsrv_uc_proxy(socket_t so, void *arg, int waitflag)
{
  ....
  if (myqueue->ucq_flags | NFS_UC_QUEUE_SLEEPING)
    wakeup(myqueue);
  ....
}

Android

V617 CWE-480 Consider inspecting the condition. The '0x00000001' argument of the '|' bitwise operation contains a non-zero value. egl.cpp 1329


#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR  0x00000001
#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002
#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004

EGLContext eglCreateContext(....)
{
  ....
  case EGL_CONTEXT_FLAGS_KHR:
    if ((attrib_val | EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR) ||
        (attrib_val | EGL_CONTEXT_OPENGL_FORWARD_C....) ||
        (attrib_val | EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR))
    {
      context_flags = attrib_val;
    } else {
      RETURN_ERROR(EGL_NO_CONTEXT,EGL_BAD_ATTRIBUTE);
    }
  ....
}

Similar errors can be found in some other places:

  • V617 CWE-480 Consider inspecting the condition. The '0x00000001' argument of the '|' bitwise operation contains a non-zero value. egl.cpp 1338

Command & Conquer

V617 Consider inspecting the condition. The '((1L << STRUCT_CHRONOSPHERE))' argument of the '|' bitwise operation contains a non-zero value. HOUSE.CPP 5089


typedef enum StructType : char {
  STRUCT_NONE=-1,
  STRUCT_ADVANCED_TECH,
  STRUCT_IRON_CURTAIN,
  STRUCT_WEAP,
  STRUCT_CHRONOSPHERE, // 3
  ....
}

#define  STRUCTF_CHRONOSPHERE (1L << STRUCT_CHRONOSPHERE)

UrgencyType HouseClass::Check_Build_Power(void) const
{
  ....
  if (State == STATE_THREATENED || State == STATE_ATTACKED) {
    if (BScan | (STRUCTF_CHRONOSPHERE)) {  // <=
      urgency = URGENCY_HIGH;
    }
  }
  ....
}

Popular related articles
PVS-Studio for Java

Date: Jan 17 2019

Author: Andrey Karpov

In the seventh version of the PVS-Studio static analyzer, we added support of the Java language. It's time for a brief story of how we've started making support of the Java language, how far we've co…
The Last Line Effect

Date: May 31 2014

Author: Andrey Karpov

I have studied many errors caused by the use of the Copy-Paste method, and can assure you that programmers most often tend to make mistakes in the last fragment of a homogeneous code block. I have ne…
Static analysis as part of the development process in Unreal Engine

Date: Jun 27 2017

Author: Andrey Karpov

Unreal Engine continues to develop as new code is added and previously written code is changed. What is the inevitable consequence of ongoing development in a project? The emergence of new bugs in th…
Free PVS-Studio for those who develops open source projects

Date: Dec 22 2018

Author: Andrey Karpov

On the New 2019 year's eve, a PVS-Studio team decided to make a nice gift for all contributors of open-source projects hosted on GitHub, GitLab or Bitbucket. They are given free usage of PVS-Studio s…
Characteristics of PVS-Studio Analyzer by the Example of EFL Core Libraries, 10-15% of False Positives

Date: Jul 31 2017

Author: Andrey Karpov

After I wrote quite a big article about the analysis of the Tizen OS code, I received a large number of questions concerning the percentage of false positives and the density of errors (how many erro…
Technologies used in the PVS-Studio code analyzer for finding bugs and potential vulnerabilities

Date: Nov 21 2018

Author: Andrey Karpov

A brief description of technologies used in the PVS-Studio tool, which let us effectively detect a large number of error patterns and potential vulnerabilities. The article describes the implementati…
PVS-Studio ROI

Date: Jan 30 2019

Author: Andrey Karpov

Occasionally, we're asked a question, what monetary value the company will receive from using PVS-Studio. We decided to draw up a response in the form of an article and provide tables, which will sho…
Appreciate Static Code Analysis!

Date: Oct 16 2017

Author: Andrey Karpov

I am really astonished by the capabilities of static code analysis even though I am one of the developers of PVS-Studio analyzer myself. The tool surprised me the other day as it turned out to be sma…
The way static analyzers fight against false positives, and why they do it

Date: Mar 20 2017

Author: Andrey Karpov

In my previous article I wrote that I don't like the approach of evaluating the efficiency of static analyzers with the help of synthetic tests. In that article, I give the example of a code fragment…
How PVS-Studio Proved to Be More Attentive Than Three and a Half Programmers

Date: Oct 22 2018

Author: Andrey Karpov

Just like other static analyzers, PVS-Studio often produces false positives. What you are about to read is a short story where I'll tell you how PVS-Studio proved, just one more time, to be more atte…

Comments (0)

Next comments

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site.
Learn More →
Accept