diff --git a/ql/test/query-tests/Security/CWE-190/tst2.go b/ql/test/query-tests/Security/CWE-190/tst2.go index a0b89ac1828..d9dfe6912e8 100644 --- a/ql/test/query-tests/Security/CWE-190/tst2.go +++ b/ql/test/query-tests/Security/CWE-190/tst2.go @@ -14,3 +14,10 @@ func test3(r io.Reader) { data, _ := ioutil.ReadAll(r) ignore(make([]byte, len(data)+1)) // NOT OK } + +func test4(r io.Reader, ws []io.Writer) { + mw := io.MultiWriter(ws...) + ignore(make([]error, len(ws)+1)) // OK + data, _ := ioutil.ReadAll(r) + mw.Write(data) +}