Home / Vulnerability Database / C or C++ : Arithmetic operation on boolean
C/C++

C or C++ : Arithmetic operation on boolean

Overview

Arithmetic operations will not act in the same way on boolean values as they would on integral values, which may lead to unexpected behavior.

Special logical operators are used for operations with boolean variables:

  • logical negation (NOT) - !a;
  • logical AND - a&&b;
  • logical OR - a||b. .
LOW

DerScanner Severity Score

Do you want to fix C or C++ : Arithmetic operation on boolean in your application?

See also

C/C++

C or C++ : Dead store

C/C++

C or C++ : Use after free

C/C++

C or C++ : va_list uninitialized