From 9385857c39c5a805f528d8d5c7d523ced25ceb2d Mon Sep 17 00:00:00 2001 From: Max Schaefer Date: Mon, 10 Aug 2020 14:48:13 +0100 Subject: [PATCH] Add a regression test. --- ql/test/query-tests/Security/CWE-190/tst2.go | 7 +++++++ 1 file changed, 7 insertions(+) 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) +}