From: Lennart Poettering Date: Wed, 10 Apr 2019 17:36:40 +0000 (+0200) Subject: lgtm: complain about accept() [people should use accept4() instead, due to O_CLOEXEC] X-Git-Tag: v242~5^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2d0fa6feb3797246c8bfda3db45a2f5b62e1b5b;p=thirdparty%2Fsystemd.git lgtm: complain about accept() [people should use accept4() instead, due to O_CLOEXEC] --- diff --git a/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql b/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql index 96712cf1c67..865330430d9 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." ) }