Skip to content

Commit 00d1b11

Browse files
committed
chore fix document example
1 parent d99c0a2 commit 00d1b11

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

go/ql/src/experimental/CWE-522-DecompressionBombs/example_good.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ func ZipOpenReader(filename string) {
1515
for {
1616
rc, _ := f.Open()
1717
result, _ := io.CopyN(os.Stdout, rc, 68)
18+
if result == 0 {
19+
break
20+
}
1821
totalBytes = totalBytes + result
1922
if totalBytes > 1024*1024 {
2023
fmt.Print(totalBytes)

0 commit comments

Comments
 (0)