зеркало из https://github.com/github/codeql.git
Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
This commit is contained in:
Родитель
fa3053f7fa
Коммит
e264bddb25
|
@ -166,7 +166,7 @@ Here, flow starts at the outgoing argument of ``write_user_input_to(...)`` and p
|
|||
where Flow::flowPath(source, sink)
|
||||
select sink.getNode(), source, sink, "Flow from user input to sink!"
|
||||
|
||||
Notice how the ``isSource`` and ``isSink`` are as expected: we're looking for flow that starts at the outgoing parameter of ``write_user_input_to(...)``, and ends up as an argument to ``isSink``. The interesting part is the addition of ``isAdditionalFlow`` which specifies an additional flow step from the qualifier of a ``FieldAccess`` to the result of the access. Note that we have an important choice here: Should the relationship between ``n2`` and ``fa`` be implemented using ``asExpr`` or ``asIndirectExpr``?
|
||||
Notice how the ``isSource`` and ``isSink`` are as expected: we're looking for flow that starts at the outgoing parameter of ``write_user_input_to(...)``, and ends up as an argument to ``isSink``. The interesting part is the addition of ``isAdditionalFlow`` which specifies an additional flow step from the qualifier of a ``FieldAccess`` to the result of the access. We have an important choice here: Should the relationship between ``n2`` and ``fa`` be implemented using ``asExpr`` or ``asIndirectExpr``?
|
||||
|
||||
.. _using-asIndirectExpr:
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче