diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-04-05 15:31:34 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-04-05 16:58:52 +0200 |
commit | 9ff46eded2b99d244455467eb55c0ff3f51c5362 (patch) | |
tree | d6ad2db374ceeb91e89769ebc2e569845e33657f /.lgtm | |
parent | 9f717d42cbcb32223973ceb2de334cc1a68ddd91 (diff) | |
download | systemd-9ff46eded2b99d244455467eb55c0ff3f51c5362.tar.gz |
lgtm: warn about strerror() use
Diffstat (limited to '.lgtm')
-rw-r--r-- | .lgtm/cpp-queries/PotentiallyDangerousFunction.ql | 3 |
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." ) } |