Versions Compared

Key

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

...

Note that this solution may truncate the contents of original buffer, secret, if the size of the resized buffer is smaller. This behavior is similar to how realloc() handles resizing to a smaller block of memory ISO/IEC 9899-1999.

Risk Assessment

Failure to clear dynamic memory can result in leaked information.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

MEM33-C

2 (medium)

1 (unlikely)

3 (low)

P6

L2

References