...
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.
...