Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Someone who's American can Americanize the English spelling; I write English! The Risk assessment can be reworded at will, but the previous version was a clear example of cut'n'paste.

...

Code Block
bgColor#ccccff
#include <assert.h>

int foo(int a) {
  assert(a < (INT_MAX - 100));
  printf("%d %d\n", a + 100, a);
  return a;
}

int main(void) {
  foo(100);
  foo(INT_MAX);
}

Risk Assessment

Unused values may indicate significant logic errors, possibly resulting in a denial of service conditionDepending on undefined behaviour leads to problems.

Recommendation

Severity

Likelihood

Remediation Cost

Priority

Level

MSC15-A

high

high

medium

P18

L1

...