Skip to content

Commit d867172

Browse files
authored
Merge pull request #4300 from hvitved/csharp/runtime-checks-bypass-bad-magic
C#: Avoid bad magic in `RuntimeChecksBypass.ql`
2 parents dff9f82 + aac2e0e commit d867172

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

csharp/ql/src/Security Features/CWE-020/RuntimeChecksBypass.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ GuardedExpr checkedWrite(Field f, Variable v, IfStmt check) {
2727
* The result is an unsafe write to the field `f`, where
2828
* there is no check performed within the (calling) scope of the method.
2929
*/
30+
pragma[nomagic]
3031
Expr uncheckedWrite(Callable callable, Field f) {
3132
result = f.getAnAssignedValue() and
3233
result.getEnclosingCallable() = callable and

0 commit comments

Comments
 (0)