CodeQL library for C/C++
codeql/cpp-all 0.12.10 (changelog, source)
Search

Module Strcpy

Provides implementation classes modeling strcpy and various similar functions. See semmle.code.cpp.models.Models for usage information.

Import path

import semmle.code.cpp.models.implementations.Strcpy

Imports

ArrayFunction

Provides an abstract class for accurate modeling of input and output buffers in library functions when source code is not available. To use this QL library, create a QL class extending ArrayFunction with a characteristic predicate that selects the function or set of functions you are trying to model. Within that class, override the predicates provided by ArrayFunction to match the flow within that function. Finally, add a private import statement to Models.qll

DataFlow

Provides an abstract class for accurate dataflow modeling of library functions when source code is not available. To use this QL library, create a QL class extending DataFlowFunction with a characteristic predicate that selects the function or set of functions you are modeling. Within that class, override the predicates provided by DataFlowFunction to match the flow within that function.

SideEffect

Provides an abstract class for accurate dataflow modeling of library functions when source code is not available. To use this QL library, create a QL class extending SideEffectFunction with a characteristic predicate that selects the function or set of functions you are modeling. Within that class, override the predicates provided by SideEffectFunction to match the flow within that function.

Taint

Provides an abstract class for accurate taint modeling of library functions when source code is not available. To use this QL library, create a QL class extending TaintFunction with a characteristic predicate that selects the function or set of functions you are modeling. Within that class, override the predicates provided by TaintFunction to match the flow within that function.

Classes

StrcpyFunction

The standard function strcpy and its wide, sized, and Microsoft variants.