[Bug analyzer/105900] RFE: -fanalyzer could check malloc sizes when casting the result to a pointer

dmalcolm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 16 12:54:09 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105900

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
See https://cwe.mitre.org/data/definitions/131.html e.g. example 5.

See also:
 
https://clang.llvm.org/docs/analyzer/checkers.html#alpha-security-mallocoverflow-c
(CWE 131's example 2 has a case of this)


More information about the Gcc-bugs mailing list