CodeQL library for C/C++
Search

Predicate globalVarFromId

Gets the global variable whose qualified name is id. Use this predicate together with taintedIncludingGlobalVars. Example:

exists(string varName |
  taintedIncludingGlobalVars(source, tainted, varName) and
  var = globalVarFromId(varName)
)

Import path

import semmle.code.cpp.ir.dataflow.DefaultTaintTracking
GlobalOrNamespaceVariable globalVarFromId(string id)