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
+
1
18
import cpp
2
19
import PrintfLike
3
20
private import TaintTracking
@@ -152,6 +169,9 @@ abstract class FunctionWithWrappers extends Function {
152
169
}
153
170
}
154
171
172
+ /**
173
+ * A `printf`-like formatting function.
174
+ */
155
175
class PrintfLikeFunction extends FunctionWithWrappers {
156
176
PrintfLikeFunction ( ) { printfLikeFunction ( this , _) }
157
177
You can’t perform that action at this time.
0 commit comments