metrica
Мы используем куки, чтобы пользоваться сайтом было удобно.
Хорошо
to the top
close form

Заполните форму в два простых шага ниже:

Ваши контактные данные:

Шаг 1
Поздравляем! У вас есть промокод!

Тип желаемой лицензии:

Шаг 2
Team license
Enterprise license
** Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности
close form
Запросите информацию о ценах
Новая лицензия
Продление лицензии
--Выберите валюту--
USD
EUR
RUB
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Бесплатная лицензия PVS‑Studio для специалистов Microsoft MVP
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Для получения лицензии для вашего открытого
проекта заполните, пожалуйста, эту форму
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
Мне интересно попробовать плагин на:
* Нажимая на кнопку, вы даете согласие на обработку
своих персональных данных. См. Политику конфиденциальности

close form
check circle
Ваше сообщение отправлено.

Мы ответим вам на


Если вы так и не получили ответ, пожалуйста, проверьте папку
Spam/Junk и нажмите на письме кнопку "Не спам".
Так Вы не пропустите ответы от нашей команды.

Вебинар: Трудности при интеграции SAST, как с ними справляться - 04.04

>
>
>
Примеры ошибок, обнаруженных с помощью …

Примеры ошибок, обнаруженных с помощью диагностики V676

V676. Incorrect comparison of BOOL type variable with TRUE.


VirtualDub

V676 It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: 'ChooseColorA(& cc) != FALSE'. VirtualDub gui.cpp 665


bool guiChooseColor(HWND hwnd, COLORREF& rgbOld) {
  ....
  if (ChooseColor(&cc)==TRUE) {;
    rgbOld = cc.rgbResult;
    return true;
  }
  ....
}

If the user clicks the OK button of the dialog box, the return value is **nonzero**.

Similar errors can be found in some other places:

  • V676 It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: 'ChooseColorA(& cc) != FALSE'. VDFilters vfrotate2.cpp 54

Firebird

V676 It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: 'success == FALSE'. iscguard.cpp 667


THREAD_ENTRY_DECLARE start_and_watch_server(THREAD_ENTRY_PARAM)
{
  ....
  success = CreateProcess(....);
  if (success != TRUE)
    error = GetLastError();
  ....
}

#info If the function succeeds, the return value is nonzero.

Similar errors can be found in some other places:

  • V676 It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: 'success == FALSE'. iscguard.cpp 691
  • V676 It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: '(* m_funct)(lpCS) != FALSE'. locks.h 64
  • V676 It is incorrect to compare the variable of BOOL type with TRUE. iscguard.cpp 614
  • And 2 additional diagnostic messages.

CryEngine 3 SDK

V676 It is incorrect to compare the variable of BOOL type with TRUE. statsagentpipe.cpp 163


bool CStatsAgentPipe::Send()
{
  ....
  ok = ::WriteFile(s_pipe, pBuffer.c_str(), nBytes, &tx, 0)
       == TRUE;
  ....
}

Similar errors can be found in some other places:

  • V676 It is incorrect to compare the variable of BOOL type with TRUE. statsagentpipe.cpp 108

Apple II emulator

V676 It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: 'out != FALSE'. frame.cpp 381


typedef int BOOL;

static void Draw3dRect (...., BOOL out)
{
  ....
  SelectObject(dc,(out == 1) ? btnhighlightpen : btnshadowpen);
  ....
}

Amazon FreeRTOS

V676 [CWE-253] It is incorrect to compare the variable of BOOL type with TRUE. Correct expression is: 'FALSE != CryptGenRandom(hProv, len, output)'. aws_entropy_hardware_poll.c 51


int mbedtls_hardware_poll(void* data,
                          unsigned char* output,
                          size_t len,
                          size_t* olen)
{
  int lStatus = MBEDTLS_ERR_ENTROPY_SOURCE_FAILED;
  HCRYPTPROV hProv = 0;

  /* Unferenced parameter. */
  (void)data;

  /*
   * This is port-specific for the Windows simulator,
   * so just use Crypto API.
   */

  if (TRUE == CryptAcquireContextA(
                &hProv, NULL, NULL,
                PROV_RSA_FULL,
                CRYPT_VERIFYCONTEXT))
  {
    if (TRUE == CryptGenRandom(hProv, len, output))
    {
      lStatus = 0;
      *olen = len;
    }

    CryptReleaseContext(hProv, 0);
  }

  return lStatus;
}

Similar errors can be found in some other places:

  • V676 [CWE-253] It is incorrect to compare the variable of BOOL type with TRUE. aws_entropy_hardware_poll.c 48