summaryrefslogtreecommitdiff
path: root/.lgtm
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-10 19:36:40 +0200
committerLennart Poettering <lennart@poettering.net>2019-04-10 20:03:38 +0200
commite2d0fa6feb3797246c8bfda3db45a2f5b62e1b5b (patch)
tree548627e1e9f4a3ef60e97b9caa86aff95d53be59 /.lgtm
parent86a3d44de5326fd4d714e90bf9012360f1d028a2 (diff)
downloadsystemd-e2d0fa6feb3797246c8bfda3db45a2f5b62e1b5b.tar.gz
lgtm: complain about accept() [people should use accept4() instead, due to O_CLOEXEC]
Diffstat (limited to '.lgtm')
-rw-r--r--.lgtm/cpp-queries/PotentiallyDangerousFunction.ql3
1 files changed, 3 insertions, 0 deletions
diff --git a/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql b/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql
index 96712cf1c6..865330430d 100644
--- a/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql
+++ b/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql
@@ -41,6 +41,9 @@ predicate potentiallyDangerousFunction(Function f, string message) {
) or (
f.getQualifiedName() = "strerror" and
message = "Call to strerror() is not thread-safe. Use strerror_r() or printf()'s %m format string instead."
+ ) or (
+ f.getQualifiedName() = "accept" and
+ message = "Call to accept() is not O_CLOEXEC-safe. Use accept4() instead."
)
}