Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 9385857

Browse files
author
Max Schaefer
committed
Add a regression test.
1 parent c2a26f8 commit 9385857

File tree

1 file changed

+7
-0
lines changed
  • ql/test/query-tests/Security/CWE-190

1 file changed

+7
-0
lines changed

ql/test/query-tests/Security/CWE-190/tst2.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@ func test3(r io.Reader) {
1414
data, _ := ioutil.ReadAll(r)
1515
ignore(make([]byte, len(data)+1)) // NOT OK
1616
}
17+
18+
func test4(r io.Reader, ws []io.Writer) {
19+
mw := io.MultiWriter(ws...)
20+
ignore(make([]error, len(ws)+1)) // OK
21+
data, _ := ioutil.ReadAll(r)
22+
mw.Write(data)
23+
}

0 commit comments

Comments
 (0)