summaryrefslogtreecommitdiff
path: root/.lgtm
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-05 15:31:34 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-05 16:58:52 +0200
commit9ff46eded2b99d244455467eb55c0ff3f51c5362 (patch)
treed6ad2db374ceeb91e89769ebc2e569845e33657f /.lgtm
parent9f717d42cbcb32223973ceb2de334cc1a68ddd91 (diff)
downloadsystemd-9ff46eded2b99d244455467eb55c0ff3f51c5362.tar.gz
lgtm: warn about strerror() use
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 cd0284b37a..96712cf1c6 100644
--- a/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql
+++ b/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql
@@ -38,6 +38,9 @@ predicate potentiallyDangerousFunction(Function f, string message) {
) or (
f.getQualifiedName() = "ntohs" and
message = "Call to ntohs() is confusing. Use be16toh() instead."
+ ) or (
+ f.getQualifiedName() = "strerror" and
+ message = "Call to strerror() is not thread-safe. Use strerror_r() or printf()'s %m format string instead."
)
}