mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +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 (
|
) or (
|
||||||
f.getQualifiedName() = "strerror" and
|
f.getQualifiedName() = "strerror" and
|
||||||
message = "Call to strerror() is not thread-safe. Use strerror_r() or printf()'s %m format string instead."
|
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