From: Lennart Poettering Date: Fri, 5 Apr 2019 13:31:34 +0000 (+0200) Subject: lgtm: warn about strerror() use X-Git-Tag: v242-rc4~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ff46eded2b99d244455467eb55c0ff3f51c5362;p=thirdparty%2Fsystemd.git lgtm: warn about strerror() use --- diff --git a/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql b/.lgtm/cpp-queries/PotentiallyDangerousFunction.ql index cd0284b37a5..96712cf1c67 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." ) }