Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4ae422c

Browse files
committed
Python: Add test for extraneous overflow arguments
1 parent 00966bb commit 4ae422c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

python/ql/test/experimental/dataflow/coverage/argumentPassing.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,18 @@ def grab_foo_bar_baz(foo, **kwargs):
121121

122122
def grab_bar_baz(bar, **kwargs):
123123
SINK2(bar)
124+
try:
125+
SINK2(kwargs["bar"])
126+
except:
127+
print("OK")
124128
grab_baz(**kwargs)
125129

126130

127131
def grab_baz(baz):
128132
SINK3(baz)
129133

130134

131-
@expects(3)
135+
@expects(4)
132136
def test_grab():
133137
grab_foo_bar_baz(baz=arg3, bar=arg2, foo=arg1)
134138

0 commit comments

Comments
 (0)