Skip to content

Commit bf69cb0

Browse files
committed
comment isAdditionalFlowStep--no longer needed
1 parent 684b4c1 commit bf69cb0

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

SqlInjection.ql

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,21 @@ module SqliFlowConfig implements DataFlow::ConfigSig {
2121

2222
predicate isBarrier(DataFlow::Node sanitizer) { none() }
2323

24-
predicate isAdditionalFlowStep(DataFlow::Node into, DataFlow::Node out) {
25-
// Extra taint step
26-
// snprintf(query, bufsize, "INSERT INTO users VALUES (%d, '%s')", id, info);
27-
// But snprintf is a macro on mac os. The actual function's name is
28-
// #undef snprintf
29-
// #define snprintf(str, len, ...) \
30-
// __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
31-
// #endif
32-
exists(FunctionCall printf |
33-
printf.getTarget().getName().matches("%snprintf%") and
34-
printf.getArgument(0) = out.(DataFlow::PostUpdateNode).getPreUpdateNode().asIndirectArgument() and
35-
// very specific: shifted index for macro.
36-
printf.getArgument(6) = into.asExpr()
37-
)
38-
}
24+
// predicate isAdditionalFlowStep(DataFlow::Node into, DataFlow::Node out) {
25+
// // Extra taint step
26+
// // snprintf(query, bufsize, "INSERT INTO users VALUES (%d, '%s')", id, info);
27+
// // But snprintf is a macro on mac os. The actual function's name is
28+
// // #undef snprintf
29+
// // #define snprintf(str, len, ...) \
30+
// // __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), __VA_ARGS__)
31+
// // #endif
32+
// exists(FunctionCall printf |
33+
// printf.getTarget().getName().matches("%snprintf%") and
34+
// printf.getArgument(0) = out.(DataFlow::PostUpdateNode).getPreUpdateNode().asIndirectArgument() and
35+
// // very specific: shifted index for macro.
36+
// printf.getArgument(6) = into.asExpr()
37+
// )
38+
// }
3939

4040
predicate isSink(DataFlow::Node sink) {
4141
// rc = sqlite3_exec(db, query, NULL, 0, &zErrMsg);

0 commit comments

Comments
 (0)