mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Modernize MemcpyFunction.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user