Skip to content

Commit b5cbd90

Browse files
Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <[email protected]>
1 parent 35702a9 commit b5cbd90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ Consider an alternative scenario where ``U`` contains a single ``int`` data, and
325325
Since the ``data`` field is now an ``int`` instead of an ``int*`` the field no longer has any indirections, and so the use of ``asIndirectExpr`` in ``isAdditionalFlowStep`` no longer makes sense (and so the additional step will have no results). So there is no choice about whether to taint the value of the field or its indirection: it has to be the value.
326326

327327
However, since we pass the address of ``data`` to ``use_pointer`` on line 12 the tainted value is what is pointed to by the argument of ``use_pointer`` (since the value pointed to by ``&data`` is exactly ``data``). So to handle this case we need a mix of the two situations above:
328-
1. We need to taint the value of the field as described the :ref:`Using asExpr <using-asExpr>` section.
328+
1. We need to taint the value of the field as described in the :ref:`Using asExpr <using-asExpr>` section.
329329
2. We need to select the indirection of the argument as described in the :ref:`Using asIndirectExpr <using-asIndirectExpr>` section.
330330

331331
With these changes the query looks like:

0 commit comments

Comments
 (0)