jroelofs added inline comments.
================ Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:1 +// MmapWriteExecChecker.cpp - Check for the prot argument +// ---------------- Needs one of these at the top: ``` //===- MmapWriteExecChecker.cpp - Check the mmap prot argument ---------------*- C++ -*-===// ``` Appropriately fitted to 80-cols. ================ Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:10 +// +// This checker detects a common memory allocation security flaw. +// Suppose 'unsigned int n' comes from an untrusted source. If the ---------------- This comment was lifted from `MallocOverflowSecurityChecker.cpp`, and doesn't accurately describe what *this* checker does. ================ Comment at: lib/StaticAnalyzer/Checkers/MmapWriteExecChecker.cpp:58 + + if ((prot & (ProtWrite | ProtExec))) { + if (!BT) { ---------------- I assume you meant: ``` if ((prot & (ProtWrite | ProtExec)) == (ProtWrite | ProtExec)) { ``` ? Repository: rC Clang https://reviews.llvm.org/D42645 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits