diff options
| author | 2026-02-21 20:55:37 +0800 | |
|---|---|---|
| committer | 2026-02-21 20:55:37 +0800 | |
| commit | 2cb9c32187f0f14f38ab8124466f0ad17f77c5d0 (patch) | |
| tree | d747cfe22f48a5c134906eb9efed99c471491be8 /internal/zlib | |
| parent | internal/zlib: Fix lints (diff) | |
| signature | No signature | |
*: Fix nosec
Diffstat (limited to 'internal/zlib')
| -rw-r--r-- | internal/zlib/reader.go | 2 | ||||
| -rw-r--r-- | internal/zlib/writer.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/zlib/reader.go b/internal/zlib/reader.go index 62fe57a7..6e70fdea 100644 --- a/internal/zlib/reader.go +++ b/internal/zlib/reader.go @@ -131,7 +131,7 @@ func (z *reader) Read(p []byte) (int, error) { return n, io.EOF } -// Calling Close does not close the wrapped [io.Reader] originally passed to [NewReader]. +// Close does not close the wrapped [io.Reader] originally passed to [NewReader]. // In order for the ZLIB checksum to be verified, the reader must be // fully consumed until the [io.EOF]. func (z *reader) Close() error { diff --git a/internal/zlib/writer.go b/internal/zlib/writer.go index 777a32d2..5497f089 100644 --- a/internal/zlib/writer.go +++ b/internal/zlib/writer.go @@ -206,7 +206,7 @@ func (z *Writer) writeHeader() (err error) { if z.dict != nil { z.scratch[1] |= 1 << 5 } - z.scratch[1] += uint8(31 - binary.BigEndian.Uint16(z.scratch[:2])%31) + z.scratch[1] += uint8(31 - binary.BigEndian.Uint16(z.scratch[:2])%31) //#nosec G115 if _, err = z.w.Write(z.scratch[0:2]); err != nil { return err } |
