File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
cpp/ql/src/semmle/code/cpp/security Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Provides predicates for identifying functions which wrap other functions,
3+ * passing the same arguments from the outer call into the inner call. In the
4+ * following example `MyMalloc` wraps a call to `malloc`, passing in the `size`
5+ * parameter:
6+ * ```
7+ * void *MyMalloc(size_t size)
8+ * {
9+ * void *ptr = malloc(size);
10+ *
11+ * // ... additional logic?
12+ *
13+ * return ptr;
14+ * }
15+ * ```
16+ */
17+
118import cpp
219import PrintfLike
320private import TaintTracking
@@ -152,6 +169,9 @@ abstract class FunctionWithWrappers extends Function {
152169 }
153170}
154171
172+ /**
173+ * A `printf`-like formatting function.
174+ */
155175class PrintfLikeFunction extends FunctionWithWrappers {
156176 PrintfLikeFunction ( ) { printfLikeFunction ( this , _) }
157177
You can’t perform that action at this time.
0 commit comments