Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
if (s== 0) {
  /* Handle Error */
}
list = (int*)malloc(s);
if (list == NULL) {
  /* Handle Allocation Error */
}
/* Continue Processing list */

Priority: P12 Level: L1

Assuming that allocating zero bytes results in an error can lead to buffer overflows when zero bytes are allocated. Buffer overflows can be exploited by an attacker to run arbitrary code with the permissions of the vulnerable process.

Component

Value

Severity

3 (high)

Likelihood

2 (probable)

Remediation cost

2 (medium)

References