Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by sciSpider v2.4 (sch jbop) (X_X)@==(Q_Q)@

...

Wiki Markup
Where the integer {{s}} and the declaration are both evaluated at runtime. If a size argument supplied to VLAs is not a positive integer value of reasonable size, then the program may behave in an unexpected way. An attacker may be able to leverage this behavior to overwrite critical program data \[[Griffiths 06|AA. C References#Griffiths 06]\]. The programmer must ensure that size arguments to VLAs are valid and have not been corrupted as the result of an exceptional integer condition.

...

Noncompliant Code Example

In this non-compliant noncompliant code example, a VLA of size s is declared. The size s is declared as size_t in compliance with INT01-C. Use rsize_t or size_t for all integer values representing the size of an object.

...