Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added Rose checker algorithm

...

GCC Compiler can detect some violations of this rule when the -Wcast-align flag is used.

Compass/ROSE could detect violations of this rule by checking for pointer casts where the new object size is smaller than the old object size.

Code Block

  bigtype bt;
  smalltype *ptr = (smalltype*) (&bt);

Related Vulnerabilities

Search for vulnerabilities resulting from the violation of this rule on the CERT website.

...