Skip to content

Commit f6b1d66

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

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
@@ -392,7 +392,12 @@ To set the stage, consider the following scenario:
392392
free(b.a);
393393
}
394394
395-
We write a user-controlled value into the object ``b`` at the access path ``[a, x]``. Afterwards, ``b`` is passed to ``read_data`` which we don't have the definition of in the database. We now want to track this user-input flowing into ``read_data``.
395+
What happens here is the following:
396+
397+
1. We write a user-controlled value into the object ``b`` at the access path ``[a, x]``.
398+
2. Afterwards, ``b`` is passed to ``read_data`` which we don't have the definition of in the database.
399+
400+
We now want to track this user-input flowing into ``read_data``.
396401

397402
The dataflow library has a specific predicate to handle this scenario, and thus we don't need to add any additional flow steps using ``isAdditionalFlowStep``. Instead, we tell the dataflow library that ``read_data`` is a sink and may implicitly read the data from fields in the object it is passed. To do that, we implement ``allowImplicitRead`` in our dataflow module:
398403

0 commit comments

Comments
 (0)