C++: Modernize MemcpyFunction.

This commit is contained in:
Geoffrey White
2020-10-01 10:53:18 +01:00
parent ce9abe071d
commit fb9a3b323d

View File

@@ -16,13 +16,9 @@ import semmle.code.cpp.models.interfaces.Taint
class MemcpyFunction extends ArrayFunction, DataFlowFunction, SideEffectFunction {
MemcpyFunction() {
// memcpy(dest, src, num)
this.hasName("memcpy")
or
// memmove(dest, src, num)
this.hasName("memmove")
or
// memmove(dest, src, num, remaining)
this.hasName("__builtin___memcpy_chk")
this.hasName(["memcpy", "memmove", "__builtin___memcpy_chk"])
or
// bcopy(src, dest, num)
this.hasGlobalOrStdName("bcopy")