Python: Add BarrierGuard test with return inside unsafe branch

This commit is contained in:
Rasmus Wriedt Larsen
2020-11-20 11:52:36 +01:00
parent 6c8937c5a9
commit 34f78d4211
2 changed files with 11 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ test_taint
| test_logical.py:123 | ok | test_nesting_not_with_and_true | s |
| test_logical.py:126 | ok | test_nesting_not_with_and_true | s |
| test_logical.py:128 | ok | test_nesting_not_with_and_true | s |
| test_logical.py:137 | fail | test_with_return | s |
isSanitizer
| TestTaintTrackingConfiguration | test.py:21:39:21:39 | ControlFlowNode for s |
| TestTaintTrackingConfiguration | test.py:50:10:50:29 | ControlFlowNode for emulated_escaping() |

View File

@@ -128,6 +128,15 @@ def test_nesting_not_with_and_true():
ensure_not_tainted(s)
def test_with_return():
s = TAINTED_STRING
if not is_safe(s):
return
ensure_not_tainted(s)
# Make tests runable
test_basic()
@@ -136,3 +145,4 @@ test_and()
test_tricky()
test_nesting_not()
test_nesting_not_with_and_true()
test_with_return()