1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

lgtm: complain about accept() [people should use accept4() instead, due to O_CLOEXEC]

This commit is contained in:
Lennart Poettering 2019-04-10 19:36:40 +02:00
parent 86a3d44de5
commit e2d0fa6feb

View File

@ -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."
)
}