Skip to content

Commit 1b1a78b

Browse files
committed
C++: Convert a paragraph to a numbered list.
1 parent 342f4f8 commit 1b1a78b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ This would match the call to ``write_user_input_to`` in the following example:
138138
free(u);
139139
}
140140
141-
Flow now starts at the outgoing argument of ``write_user_input_to(...)`` and proceeds to ``u->p``. However, because CodeQL has not observed a write to ``p`` prior to the read ``u->p``, dataflow will stop at ``u``. In order to convince CodeQL to proceed we need to add an additional flow step through field reads like so:
141+
With this definition of ``isSource`` the data flow tracks flow along the following path:
142+
143+
1. The flow now starts at the outgoing argument of ``write_user_input_to(...)``.
144+
2. The flow proceeds to ``u->p`` on the next line.
145+
146+
However, because CodeQL has not observed a write to ``p`` before the read ``u->p``, dataflow will stop at ``u``. We can correct this gap in the information available to dataflow by adding an additional flow step through field reads:
142147

143148
.. code-block:: ql
144149

0 commit comments

Comments
 (0)