mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
lgtm: complain about accept() [people should use accept4() instead, due to O_CLOEXEC]
This commit is contained in:
parent
86a3d44de5
commit
e2d0fa6feb
@ -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."
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user