Skip to content

Commit bc7cda5

Browse files
committed
update from pre/postUpdate node to new forms
1 parent bf69cb0 commit bc7cda5

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

SqlInjection.ql

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,12 @@ module SqliFlowConfig implements DataFlow::ConfigSig {
1515
// count = read(STDIN_FILENO, buf, BUFSIZE);
1616
exists(FunctionCall read |
1717
read.getTarget().getName() = "read" and
18-
read.getArgument(1) = source.(DataFlow::PostUpdateNode).getPreUpdateNode().asIndirectArgument()
18+
read.getArgument(1) = source.asDefiningArgument()
1919
)
2020
}
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-
// }
39-
4024
predicate isSink(DataFlow::Node sink) {
4125
// rc = sqlite3_exec(db, query, NULL, 0, &zErrMsg);
4226
exists(FunctionCall exec |

0 commit comments

Comments
 (0)