]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
lgtm: dirname() is now icky
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2022 12:58:13 +0000 (14:58 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 23 Aug 2022 13:10:15 +0000 (15:10 +0200)
.lgtm/cpp-queries/PotentiallyDangerousFunction.ql

index 39e8dddd13a07219bedb768edf2ee8e74d0f31de..63fd14e75f611cfa0a7ab2686b17f1e18d6a9c93 100644 (file)
@@ -46,6 +46,9 @@ predicate potentiallyDangerousFunction(Function f, string message) {
   ) or (
     f.getQualifiedName() = "accept" and
     message = "Call to accept() is not O_CLOEXEC-safe. Use accept4() instead."
+  ) or (
+    f.getQualifiedName() = "dirname" and
+    message = "Call dirname() is icky. Use path_extract_directory() instead."
   )
 }